0 Replies Latest reply on Feb 19, 2003 8:05 AM by 387470

    Help!!! 80040e21 error

      using VB6 with
      ORACLE OLE DB version:
      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
      .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
      .Fields(0) = "test"
      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?