|
Subject:
|
ADO Execute !!HELP!!
|
|
Posted By:
|
AST
|
Post Date:
|
8/7/2003 3:02:05 AM
|
Hi,
any ideas ?
I have tried to get an information about affected rows by an SQL Statement.
Dim lngRowsAffected As Long
If cnS44B6573.State = 1 Then cnS44B6573.Execute strSQL, lngRowsAffected, adCmdText End If
strSQL is something like UPDATE TABLE SET FIELD = 5
The statement is processed accurate but lngRowsAffected is always -1 !?
Using:
VB6, VisualStudio, ADOx 2.6, MDAC2.6, MS JET 4.0, IBM AS/400 OLE DB Provider, AS/400 (DB2) V5R1
|
|
Reply By:
|
xgbnow
|
Reply Date:
|
8/7/2003 8:23:40 AM
|
I had a similar problem once with the record count using ADO. What it came down to was I was using a Server Side Cursor. Just off the top of my head, I would ensure you are using a Client Side Cursor and see what the results are.
Larry Asher
|
|
Reply By:
|
Jeff Mason
|
Reply Date:
|
8/10/2003 8:57:20 AM
|
Be sure that SET NOCOUNT ON has not been executed by any prior statements on the connection.
Be sure that the provider (AS/400) has not set this option behind your back...
Jeff Mason Custom Apps, Inc. www.custom-apps.com
|
|
Reply By:
|
AST
|
Reply Date:
|
11/13/2003 2:56:50 PM
|
..dada..
I used Option:
adExecuteNoRecords
and it works
:o)
quote: Originally posted by AST
Hi,
any ideas ?
I have tried to get an information about affected rows by an SQL Statement.
Dim lngRowsAffected As Long
If cnS44B6573.State = 1 Then cnS44B6573.Execute strSQL, lngRowsAffected, adCmdText End If
strSQL is something like UPDATE TABLE SET FIELD = 5
The statement is processed accurate but lngRowsAffected is always -1 !?
Using:
VB6, VisualStudio, ADOx 2.6, MDAC2.6, MS JET 4.0, IBM AS/400 OLE DB Provider, AS/400 (DB2) V5R1
|