DataReader Error When there is no record!

K

Kivanç Karaca

Hi all !
I am pretty sure this is an easy one but I couldnt find a way to fix it.
How can I get rid of the asp.net error saying "Invalid attempt to read when
no data is present. "
when there is no data available?
What should I do ??
Thanks
KK
 
M

Mark Rae

I'm pretty sure that you could try checking the HasRows method of the
DataReader to see if there are any returned rows....

Yes, but only in v1.1 of the Framework - this method didn't exist in v1.0
 
M

Mark

I'm pretty sure that you could try checking the HasRows method of the
DataReader to see if there are any returned rows....

hth
Cheers
Mark

--
 
M

Mark

Yes, that's true

--
----------------------------------------------------------------
-**-
www.byteboss.com : EZ website builder
-**-
Replace the Z with the e to reply
----------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top