sqldatareader.read()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Wondering why the following if statement does not run.

// obviously the name of my datareader is not sqldatareader
if(sqldatareader.read())
{
//code
}

For some reason when my code hits the following if statement it is reading
"(!sqldatareader.read()).
There are no other sqldatareaders open.
When querying the storedprocedure in query analyzer records are returned.
The connection is open and everything goes fine while reading the name of
the stored proc, etc..
What other reasons might the datareader.read() not be executing?
 
You might also need to check for multiple resultsets from your query (i.e.
what does NextResult() return?).

--
~Alazel

Alazel Acheson
Software Developer
Microsoft SQL Server

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top