0

I am troubleshooting a very old web site that uses Classic ASP written in Visual Basic. I've narrowed the problem down to a failure when attempting to open an ADO connection.

The code looks like this:

On Error Goto 0
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.ConnectionString = myConnectionString;
myConnection.CommandTimeout = 180
myConnection.CursorLocation = 3
myConnection.Open

The error that I see in failed request logging looks like this:

<EventData>
    <Data Name="ContextId">{80340036-0006-FF00-113F-84710C7967BB}</Data>
    <Data Name="LineNumber">194</Data>
    <Data Name="ErrorCode">80040e21</Data>
    <Data Name="Description">Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.</Data>
</EventData>

The error message is "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."

My question is: How exactly do I "check each OLE DB status value?" Is there some collection I need to iterate over?

Note: I am not asking for help determining root cause. I just want to "check each OLE DB status value" as instructed, so I can investigate it myself. Answers like this one try to help determine root cause, which is not what I'm asking.

John Wu
  • 50,556
  • 8
  • 44
  • 80
  • 1
    Classic ASP sites are powered by Active Scripting languages the default being VBScript. Visual Basic on the other hand is a fully fledge programming language that can be compiled to build DLLs and Executables. – user692942 Jul 21 '22 at 20:18
  • 2
    Does this answer your question? [Getting "Multiple-step operation generated errors. Check each status value." error using ADO with SQL server 2008](https://stackoverflow.com/questions/8040609/getting-multiple-step-operation-generated-errors-check-each-status-value-err) – user692942 Jul 21 '22 at 20:20
  • 1
    @user692942 That is a very helpful answer for looking for root cause. But no, it doesn't answer my question, because it doesn't tell me how to check each status value. – John Wu Jul 21 '22 at 20:24
  • You would need to look into enabling ODBC trace logging in the ODBC Administration settings (`odbcad32`), to get that level of detail. – user692942 Jul 21 '22 at 21:56
  • 1
    Does this answer your question? [Logging ODBC, SQL Server](https://stackoverflow.com/a/2733050/692942) – user692942 Jul 21 '22 at 22:18

0 Answers0