Re: sqldatareader.read()



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.

"Greg Burns" <bluebunny@xxxxxxxxxxxxxxxxx> wrote in message
news:eBrCW9v5FHA.3188@xxxxxxxxxxxxxxxxxxxxxxx
> Try checking the sqldatareader's HasRows property...
>
> "Pat Brown" <PatBrown@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:4AE3F85D-6FD6-4F80-8216-91E2FEB12B12@xxxxxxxxxxxxxxxx
>> 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?
>>
>
>


.



Relevant Pages

  • Re: optimizer behaviour changed
    ... Given you have also done an order by which is not in the select list - the server must build an index to reorder the data which he is reading directly from the index. ... QUERY PLAN FOR STATEMENT 1. ... Using I/O Size 2 Kbytes for index leaf pages. ... With LRU Buffer Replacement Strategy for index leaf pages. ...
    (comp.databases.sybase)
  • Re: Dynamic use of Access query
    ... > But this code needs to add parameters from the query: ... > Set adoCmd = New ADODB.Command ... EXECUTE (this is what the ADO Command object is using under the hood ... If you are saying your stored proc doesn't have any parameters, ...
    (microsoft.public.excel.programming)
  • Re: stored proc RETURN_VALUE.... there it is, I want to use it !!!
    ... > Then you can read the value of @total after closing the query. ... > 2 Set up your input param values. ... the result of this sql code returns an integer that is ... >> take the guts of the stored proc with hard coded guestid and meeting ...
    (borland.public.delphi.database.ado)
  • Re: Programming in standard c
    ... may grow larger between the query and the reading. ... That wider programming environment can provide guarantees ... and learned my craft in the days when memory was ...
    (comp.lang.c)
  • Re: Stored procedure never finishes
    ... Perhaps when you run the query without the date range, ... You do this by issuing "exec sp_lock [spid]" with spid being ... SQL Server MVP ... > I have a stored proc that won't finish. ...
    (microsoft.public.sqlserver.server)