Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Updating record using ADO
I’m having problem using VB6 with ADO 2.0 to update records in an Oracle
8.0.4 recordset (different error if database is Access)
If I’m using the native OLE DB:
conn.Provider = "MSDAORA.1"
conn.ConnectionString = "Data Source=xx;User ID=rzz;Password=rxz ;Persist
Security Info=True"
conn.Open
SQLQuery = "SELECT * FROM TB_R"
ADOrst.Open SQLQuery, ADOConn, adOpenDynamic, adLockBatchOptimistic,
adCmdText
ADOrst.MoveFirst
Do While Not ADOrst.EOF
With ADOrst
.Update "StartDate", "12/12/98"
.MoveNext
End With
The .Update failed immediately with ‘The operation requested by the application is not supported by the provider”
If I’m using the ODBC OLE DB driver:
.ConnectionString = "User ID=rzz;Password=rxz;DSN=oraDB"
.Open
SQLQuery = "SELECT * FROM TB_R"
ADOrst.Open SQLQuery, ADOConn, adOpenDynamic, adLockBatchOptimistic,
adCmdText
ADOrst.MoveFirst
Do While Not ADOrst.EOF
With ADOrst
.Update "StartDate", "12/12/98"
.MoveNext
End With
The first .Update went thru OK. The second time around, the .Update failed with error code 80040e25 ( All HROWs must be released before new ones can be obtained)
This is just a simple make the connect, open the recordset, update the records...but I must have missed something.
If the database in the second case is Access, I got "The number of rows with pending changes has exceeded the set limit" error.
Any help is appreciated.
TIA Received on Tue Jan 05 1999 - 16:02:30 CST