paul.hartland at fsmail.net
paul.hartland at fsmail.net
Wed Aug 22 02:03:20 CDT 2007
Borge, Can't see anything your doing wrong, I have this (cut down) in VB6: Dim lngRecords as long Some Code Here dbConn.Execute strSQL, lngRecords, adExecuteNoRecords msgbox lngRecords Works fine, so without seeing all your code, or an example I am not too sure whats going on. Paul Message Received: Aug 22 2007, 03:59 AM From: pcs at azizaz.com To: "Access Developers discussion and problem solving" Cc: pcs at azizaz.com Subject: [AccessD] ADO 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com Paul Hartland paul.hartland at fsmail.net 07730 523179