Iteria
New member
- Joined
- Jun 16, 2007
- Messages
- 2
- Programming Experience
- Beginner
I keep getting a compiler error that tells me that I'm trying to access non-existent data. I ran the query in SQL Server and I received results back. In debugging mode I ran the HasRows method of sqlDataReader and it returned true, so I was definitely sure that there were rows being returned.
Still, whenever I ran dataReaderVariable.Item(someColumnIndexValue) or dataReaderVariable.Item("someKnownColumnName") I would get an error. I'm not really sure why I'm getting this error. There's no reason for it as there are rows being returned.
Here's the exact error, "Invalid attempt to read when no data is present."
Still, whenever I ran dataReaderVariable.Item(someColumnIndexValue) or dataReaderVariable.Item("someKnownColumnName") I would get an error. I'm not really sure why I'm getting this error. There's no reason for it as there are rows being returned.
Here's the exact error, "Invalid attempt to read when no data is present."