I have a select statement that narrows the records down to one (ex. A UserID). Something that I want out of that row is to set the variable strFirstName to the value in the "FirstName" column in my record. How do I do that?
skis: I would select "FirstName" in the SELECT statement and then pick up the value when you execute your reader; one possibility..e.g.,
SELECT ..., ..., "FirstName" FROM tbl...
and when you execute the reader pick up the value:
Dim strFirstName As String
reader = DBCommand.ExecuteReader()
While reader.Read()
....
strFirstName = reader("FirstName"
Acme.Text = reader("Acme"
...
End While
reader.Close()
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.