none
VC# with ADO2.8 why transaction error is happening? RRS feed

  • Question

  • I'm making application with VC# and ADO2.8. I have reason that i have to use ADO 2.8 instead of ADO.NET. This is the error I got.

     

    System.Runtime.InteropServices.COMException was caught
      Message="Transaction cannot have multiple recordsets with this cursor type. Change the cursor type, commit the transaction, or close one of the recordsets."
      Source="Microsoft OLE DB Provider for ODBC Drivers"
      ErrorCode=-2147467259
      StackTrace:
           at ADODB.ConnectionClass.Execute(String CommandText, Object& RecordsAffected, Int32 Options)
           at Contrac_Helper.frmVENDOR.Update_Vendor() in C:\The_Work\VB_Contract\Contrac_Helper\Contrac_Helper\frmVENDOR.cs:line 630

    All I did was sending 2 update qurey.

     

         Program.dbMAIN.Execute(cTUPDTEXT[0], out OutAffected, 0);
         Program.dbMAIN.Execute(cTUPDTEXT[1], out OutAffected, 0);
         Program.dbMAIN.CommitTrans();

    First update went ok but second update had that error.

    Please help me how i can solve that error?

     

    Saturday, August 4, 2007 9:27 PM