Multiple step errors

Results 1 to 2 of 2

Thread: Multiple step errors

  1. #1
    Join Date
    Dec 1969

    Default Multiple step errors

    Hi, I have migrated data from an access database to mySQL.Using the same scripts (ASP2.0)that used with the access database <BR>when try to perform an update operation, using ADO, with the cursor server side I get: <BR><BR>Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. <BR><BR>When the cursor is server side I get: <BR>Microsoft Cursor Engine error &#039;80040e21&#039; <BR><BR>Multiple-step operation generated errors. Check each status value <BR><BR>The code is:<BR><BR>&#039;------------------------MYSQL connection---------------------------- <BR><BR>strConnection = "driver={MySQL};server=MYIPADDS;uid=root;pwd=;data base=experts;option=NUM" <BR>&#039;-------create recordset <BR>Set RecordSet = Server.CreateObject("ADODB.Recordset") <BR>RecordSet.CursorLocation=adUseClient <BR><BR><BR>If Request.QueryString("SubjectArea") &#060;&#062; "" Then <BR><BR>RecordToEdit = Request.QueryString("SubjectArea") <BR>strSQL = "SELECT SubjectArea FROM tblSubjArea WHERE (((tblSubjArea.SubjectArea)=&#039;" & RecordToEdit & "&#039;));" <BR><BR>End If <BR><BR><BR>If Request.Form("btnUpdate") = "Update" Then <BR><BR>RecordSet.Fields("SubjectArea") =Request.Form("txtSubjectArea") <BR>RecordSet.Update <BR>Updated="True" <BR>End If <BR>RecordSet.Open strSQL,strConnection,adOpenDynamic,adLockOptimisti c <BR>...........some html here <BR><BR>----close connection <BR>recordset.close <BR>set recordset=nothing <BR><BR> I use MYODBC version 2.5 and MYsql 3.23.39 <BR>Here is the code: <BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default How to get the errors...

    You will have to use a connection object, instead of just applying the connection string to the RecordSet object.<BR><BR>Then you do:<BR><BR>&#060;%<BR>...<BR>conn.Errors.Clear<BR> On Error Resume Next<BR>RecordSet.Open strSQL,conn,adOpenDynamic,adLockOptimistic <BR>On Error GoTo 0<BR>For Each oops In conn.Errors<BR>&nbsp; &nbsp; Response.Write "DB error: " & oops.Number & ", " & oops.Description & "&lt;br&#062;"<BR>Next<BR>...<BR>%&#062;<BR><BR>Th at should show you each error encountered. (Don&#039;t be surprised if there is only one.)<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts