VB6 trace error

Is there a way to trace where the error has occured from the exe not by using the source code. The user gets a "multiple step OLEDB operations error"
Who is Participating?
plummet is right, no reasonable tracing without source code and an IDE.  On one hand, you could try to document what the app does, when the problem occurs, and other details at the time, as plummet suggested.  But on the other hand, what can you do about it in the app itself if  you don't have source code?

If, for instance, you know the program works doing the same or similar task other times, except for some particular circumstance, without source code, you're better off looking elsewhere.  For instance, if the problem is repeatable:

a) if the app seems to work sometimes, say, during data entry, but has the problem another time when you think it should be work like the known good scenario, something must be different.  For instance, does a certain sequence of steps cause the problem?  Does data entry without an apostrophe or quote character work, but with an apostrophe or quote character it fails?  What about length of text in a field?  We need more details about the problem to get further info along these lines.
b) is this a new/recent problem - maybe something else changed?
c) try repeating with another user logged in - maybe it's a profile problem.
d) try repeating on another computer - maybe the problem is some missing component or incorrect configuration.
e) if you can, try the app on a freshly installed OS with no other apps - maybe the problem is a conflict with some other app

Also, is this a locally running app only, does it use the network, a database, etc.?
As far as I know it's only possible via the source code. However is there any more information with the error message - such as a number or further messages?
AnnaJames77Author Commented:
thankyou plummet &  kbirecki for your replies.
The error msg is :
multiple step OLEDB operation generated errors. check each oledb status value, if available. no work was done.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Hi AnnaJames,

As kbirecki says there is no easy way to work out what's going on without source code, so

- Is this a new problem?
- Does it fail for all users, on all computers?
- Do some program functions work, others fail?

We need more information!
@AnnaJames77, that error text was helpful.  Here's some more info.  

This link mentions it could be a connection string problem and the resolution was to shorten the connection string:

This also directs attention to the connection string, but also indicates a potential resolution by a change in the registry:
[Snippet from Cause]
The following are two possible causes of this error:
In the registry, under the key for an OLE DB provider's CLSID, there may be an entry named OLEDB_SERVICES. If the OLE DB provider that is used to make the ADO connection does not have the OLEDB_SERVICES entry, and ADO tries to set up a property that is not supported by the provider, the error occurs. For more information about this registry entry, see the "Resolution" section.
If OLEDB_SERVICES entry exists but there is a problem in the ADO connection string, the error occurs.

[Snippet from Resolution section - Emphasis is mine]
To work around this problem, use one of the following methods:
Do not use the "Persist Security Info" keyword in your ADO connection string.
Add the OLEDB_SERVICES registry entry as follows:


1. Start Registry Editor.
2. In the registry under HKEY_CLASSES_ROOT\CLSID, find the CLSID of the OLE DB provider. For example, the following registry key is for the Microsoft OLE DB Provider for SQL Server (SQLOLEDB):
Click the CLSID, and then on the Edit menu, click Add Value and add the following registry value:
     Value Name: OLEDB_SERVICES
     Data Type: REG_DWORD
     Value: 0xFFFFFFFF
Note To find the CLSID for the provider you are using, search for the provider's ProgID (SQLOLEDB, for example) in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Classes\. Under the ProgID, there will be a key named CLSID.
If these conditions are satisfied and you still receive the error, examine your connection string for other possible errors.

You should review the article, though.  It is short.  

This post mentions that the problem for them was a field type mismatch.  

So, here are some follow-up questions:

1) did you check my questions a) - e)
2) Can you combine these answers with answers to plummet's questions, particularly "Is this a new problem?".  I'm wondering if anyone changed the backend database at all that could have affected field types.  This could relate to the third link above.
3) Does the application have a configuration capability regarding the connection to the database, either via in-app config screen, DSN, ODBC config, or external INI file, for instance?  If so, can you look at it with the concepts from the first two links in mind.  Maybe there is something that can be reconfigured there.
4) Was this app developed by someone internally that is no longer with the company, or is it a commercial app?  I'm wondering if there might be a way to find out if any other users have experienced this problem at other companies.  (If it is a commercial app, try an Internet search for ""{your app name}" multiple step OLEDB operation generated errors" (with quotes around the app name if there are spaces) as a start and see if you get any hits.

Let us know how it goes, and if it is commercial, what the name of the app is if you can.
Shanmuga SundaramDirector of Software EngineeringCommented:
From my understanding this should be because of the field length. For example if the field length is set to 15 in database and if the user tries to save the text which is above 15 then this message should be popped up. If you want to trace the line of the error the better way is to include line numbers for each statement and in the error handler include the error line to be displayed.

For example see the code below. (I use MZTools for error handling and line numbers.)

private sub command1_click()
10    On Error GoTo command1_Click_Error
20    DoEvents
30    statement1
40    statement2
50    statement3
180  statementn
190 exit sub
200    MsgBox "Error " & Err.Number & " (" & Err.Description & " in Line " & Erl & " (" & Err.Description & ") in procedure command1_Click of Form frmprocess"

@shasunder, they don't have source code available.
Shanmuga SundaramDirector of Software EngineeringCommented:
I tired to duplicate the same error that you received. The below given screen shows that i created a table with 2 fields (name of 25 characters width and address of 10 characters width)
 databaseThe code i wrote to duplicate the issue is given below
 codeNow I type the text which is less than 10 characters for both name and address and click save.
 lessthan10you can see the values updated in the database
 resultNow i try to give the address above 10 characters and we get the error displayed. Is this the error you get?
@shasunder, I agree that is a good possibility of the cause, which is one of the topics discussed in #36494576.  We're waiting for AnnaJames77 answers, so if they can tell us it it worked at one time and now fails, something on the backend may have changed, such as field length.  What do you think of the connection string aspect?  We don't yet know how the app connects to the data, though.
Shanmuga SundaramDirector of Software EngineeringCommented:
My understanding is that there are no issues in the connection string. if there is connection string then the error message will be different.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.