Forum Moderators: open

Message Too Old, No Replies

Invalid attempt to access a field before calling Read()

Error using ASP.net 2.0 to connect to MySQL

         

centime

4:16 pm on Jul 7, 2007 (gmt 0)

10+ Year Member



Hi All

When I am using an ASP.NET DataReader, I get this error all the time

Does anyone here use asp.net & MySQL?

Cheers

seizer

4:17 pm on Jul 14, 2007 (gmt 0)

10+ Year Member



You should post the code sample, and the actual error.

But most likely, the answer is in the error. You need to call myReader.Read() before trying to read a field with myReader.GetString or similar.