[AccessD] ADO

pcs at azizaz.com pcs at azizaz.com
Tue Aug 21 21:58:09 CDT 2007


Hi,

I am executing the ADO command:

connection.Execute CommandText, RecordsAffected, Options

In my code the command reads:

cn.Execute strSP, lngRecordsAffected, adExecuteNoRecords

the strSP is a name of a Stored Procedure held in a SQL2005 
Db....

The executes and the SP runs fine - updating 5 records ......

I am expecting that ADO will return the numbers of records 
affected as per the ADO Helpt text, but it invariably 
returns the value of -1 ..... (sets the variable from value 
0 to -1)

The ADO 2.5 API Reference help text says:
"RecordsAffected 
Optional. A Long variable to which the provider returns the 
number of records that the operation affected. "


What am I doing wrong???

Regards
Borge



More information about the AccessD mailing list