Re: Can @@ROWCOUNT return NULL?
- From: "GeoSynch" <SpamSlayed@xxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 02:45:16 GMT
Try removing
SET NOCOUNT ON
from the stored procedure.
GeoSynch
"Dimitri Furman" <dfurman@xxxxxxxxxxx> wrote in message
news:Xns96C19F85E9F56dfurmancloud99@xxxxxxxxxxxx
> SQL Server 2000 SP3.
>
> Is it possible for the @@ROWCOUNT function to return NULL after a
> statement? I am troubleshooting a relatively large stored procedure with
> multiple SELECT statements and a couple of INSERTs into table variables.
> Immediately after each statement I save the value returned by @@ROWCOUNT to
> a local variable. That information eventually is passed back to the client
> via one output parameter, for all statements in the procedure.
> Occasionally, the value returned via that parameter is NULL. This cannot be
> reproduced by re-running the SP with the same input parameters.
>
> Before doing any further troubleshooting, I would like to rule out the
> possibility that @@ROWCOUNT can actually return a NULL under some
> circumstances. From searching the archives, it appears that in SQL Server
> 7.0 this could happen in the context of a DML query on a table with
> triggers. This is not the case here - the only DML queries are INSERTs into
> table variables, all other queries in the SP are SELECTs.
>
> Any related information would be appreciated.
>
> --
> remove a 9 to reply by email
.
- Follow-Ups:
- Re: Can @@ROWCOUNT return NULL?
- From: Erland Sommarskog
- Re: Can @@ROWCOUNT return NULL?
- References:
- Can @@ROWCOUNT return NULL?
- From: Dimitri Furman
- Can @@ROWCOUNT return NULL?
- Prev by Date: Re: What does schema mean?
- Next by Date: Installing SQLServer 2000 service packs on Clustered server
- Previous by thread: Re: Can @@ROWCOUNT return NULL?
- Next by thread: Re: Can @@ROWCOUNT return NULL?
- Index(es):
Relevant Pages
|