Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Updating record using ADO

Updating record using ADO

From: D Huynh <remove.duchuynh_at_pacbell.net>
Date: Tue, 5 Jan 1999 14:02:30 -0800
Message-ID: <x1wk2.3762$hN4.52769@typhoon-sf.snfc21.pbi.net>


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

Loop

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

Loop

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US