S
SQL
I'm new at this, so please forgive me if my question has a simple answer to
it.
I'm trying to get a value out of a SqlDataReader. Here is my code to do so:
Dim mySQLCommand As New SqlCommand("SELECT NextPrbKey FROM SystemAdmin", cn)
Dim mySQLReader As SqlDataReader = mySQLCommand.ExecuteReader()
intGetNextKey = mySQLReader.GetValue(0)
This does not return a value. I thought that GetValue(0) would return the
value of column 0 in my result set. What am I doing wrong?
Thanks.
it.
I'm trying to get a value out of a SqlDataReader. Here is my code to do so:
Dim mySQLCommand As New SqlCommand("SELECT NextPrbKey FROM SystemAdmin", cn)
Dim mySQLReader As SqlDataReader = mySQLCommand.ExecuteReader()
intGetNextKey = mySQLReader.GetValue(0)
This does not return a value. I thought that GetValue(0) would return the
value of column 0 in my result set. What am I doing wrong?
Thanks.