Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7557773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:13:13+00:00 2026-05-30T12:13:13+00:00

I am little bit stuck here .. I have a datatable as _ Dim

  • 0

I am little bit stuck here .. I have a datatable as _

Dim dtPupil As New DataTable

dtPupil.Columns.Add("PupilId", GetType(Integer))
dtPupil.Columns.Add("Forename", GetType(String))
dtPupil.Columns.Add("Surname", GetType(String))

I made a select (assuming names combination will be unique)

Dim strQuery As String = "Forename ='" & forename & "' and Surname = '" & surname & "'"
Dim dr As DataRow()
dr = dTablePupil.Select(strQuery)

I wanna have PupilId as an Integer of the row that match, so

Dim PupilID As Integer = ?????????? 

What do I need to write here? There will only be 1 row returned.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T12:13:14+00:00Added an answer on May 30, 2026 at 12:13 pm

    Firstly check the length of DataRow array,

    IF dr.Length<>0 Then
      PupilID= CType(dr(0)("PupilId"),Integer)
    End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a little bit stuck with the new ContactsContract-API here. I think I don't
I'm a little bit stuck with my poor knowledge of Symfony2 and Doctrine. Here
i have philosophised about the purpose of stack a little bit and after some
I'm having a little bit of trouble understanding what the problem is here. I
My problem is a little bit hard but simple. I have (or there is)
I have a little bit problem with resizing Listview control. I intend to make
Bit of a strange one here, i have a CCTV system and contacted the
I'm fairly new to Android and I'm a little bit confused on when to
I'm stuck with a bit of a problem here. I'm importing data from a
I'm learning haskell. Currently working through 99 questions , a little bit stuck on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.