While trying to read the value of a column, I am getting the error
Invalid attempt to read when no data is present
Code:
If reader.HasRows Then
name = reader("UserFirstName").ToString
MsgBox(name)
End If
reader.HasRows
is returning True, but while printing 'name', the error happens.
PS: UserFirstName
column name exists in the table.