Help!!! 80040e21 error
using VB6 with
ORACLE OLE DB version: 9.0.0.1
ADO version: 2.7
The following is my VB codes:
set oConn = New ADODB.Connection
oconn.CursorLocation = adUseClient
oconn.open "Provider=OraOledb.Oracle.1;data source=test;User ID=test;Password=test;PLSQLRSet=1;"
set cmdTemp = new ADODB.Command
with cmdTemp
.Activeconnection = oConn
.Properties("Updatability")=7
.Properties("IRowsetChange")=true
.commandType = adCmdText
.commandstring = "{call Ref_PO.GetPO (?,?,?)}"
end with
set rec = new ADODB.Recordset
with rec
.ActiveConnection = oConn
.CursorLocation = adUseClient
.Locktype = adLockOptimistic
.CursorType = adOpenStatic
end with
set rec.source = cmdTemp
rec.open 'ref cursor returned successfully
with rec
.AddNew
.Fields(0) = "test"
.Update
end with
With the above codes, i got the following error:
Run-time error -2147217887(80040e21)
Multiple-steps operation generated errors. Check each Status value. Source: Microsoft Cursor Engine
Can anyone tell me what i have done wrongly in my coding? I can read from the recordset successfully but not update. Why?