Re: how to retrieve [RecordsAffected] count from cmd.Excecute in V
- From: "Daniel Crichton" <msnews@xxxxxxxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 15:52:33 +0100
Stephen wrote on Wed, 26 Apr 2006 14:32:29 +0100:
Glad to hear it works. I was panicking a bit yesterday when I tested youras
code and got zeros, thinking that maybe my own code was no longer working
it was originally built with ADO 2.1. However, checking it over revealedit
still worked (phew!), and that property setting was needed.
Interesting to hear.
It reveals that it is not an optional cosmetic setting but critical to
getting action SQL SP statement counts.
Now if only MS would update the docs <sigh>
Stephen Howe
Yeah, apparently the RecordsAffected value is only populated if you tell the
Command object that it won't be getting records back - maybe it does an
implicit SET NOCOUNT ON unless that option is set, or it's result is being
assigned to a recordset object (to get the RecordCount value set). I haven't
tried running the code with Profiler to see what is actually being passed
back and forth.
Dan
.
- References:
- Re: how to retrieve [RecordsAffected] count from cmd.Excecute in VB?
- From: Daniel Crichton
- Re: how to retrieve [RecordsAffected] count from cmd.Excecute in V
- From: Daniel Crichton
- Re: how to retrieve [RecordsAffected] count from cmd.Excecute in V
- From: Rich
- Re: how to retrieve [RecordsAffected] count from cmd.Excecute in V
- From: Daniel Crichton
- Re: how to retrieve [RecordsAffected] count from cmd.Excecute in V
- From: Rich
- Re: how to retrieve [RecordsAffected] count from cmd.Excecute in V
- From: Daniel Crichton
- Re: how to retrieve [RecordsAffected] count from cmd.Excecute in V
- From: Stephen Howe
- Re: how to retrieve [RecordsAffected] count from cmd.Excecute in VB?
- Prev by Date: Re: how to retrieve [RecordsAffected] count from cmd.Excecute in V
- Next by Date: Re: Joins with Multiple Database Files
- Previous by thread: Re: how to retrieve [RecordsAffected] count from cmd.Excecute in V
- Next by thread: ATL::CDataSource and dialog with a connection string in input
- Index(es):