Connecting Tech Pros Worldwide Help | Site Map

invalid attempt to read when no data is present

Newbie
 
Join Date: Jun 2007
Posts: 1
#1: Jun 18 '07
please can anybody help me? i'm trying to retrieve data from a db with visual studio 2005 and sql server 2000 in a web application, and the error "Invalid attempt to read when no data is present" keeps showing and i don't know why...i executed my stored procedure in the query analyzer and it's ok, i'm using the sentence "mydatareader.Read()" and it's working well....please, does anybody know what can i do?
prabunewindia's Avatar
Familiar Sight
 
Join Date: Mar 2007
Location: Kerala, India
Posts: 199
#2: Jun 19 '07

re: invalid attempt to read when no data is present


hi friend,
plz paste the code, it may help us to find the solution

Quote:

Originally Posted by Naty

please can anybody help me? i'm trying to retrieve data from a db with visual studio 2005 and sql server 2000 in a web application, and the error "Invalid attempt to read when no data is present" keeps showing and i don't know why...i executed my stored procedure in the query analyzer and it's ok, i'm using the sentence "mydatareader.Read()" and it's working well....please, does anybody know what can i do?

dip_developer's Avatar
Expert
 
Join Date: Aug 2006
Location: Asansol
Posts: 641
#3: Jun 19 '07

re: invalid attempt to read when no data is present


Quote:

Originally Posted by Naty

please can anybody help me? i'm trying to retrieve data from a db with visual studio 2005 and sql server 2000 in a web application, and the error "Invalid attempt to read when no data is present" keeps showing and i don't know why...i executed my stored procedure in the query analyzer and it's ok, i'm using the sentence "mydatareader.Read()" and it's working well....please, does anybody know what can i do?

may be there is some syntax error in your code.....Please post your code.....What is the loop structure you used to read your DataReader(mydatareader)??
Reply