VB6 trace error

Posted on 2011-09-06
Last Modified: 2012-05-12
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"
Question by:AnnaJames77
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2
LVL 10

Assisted Solution

plummet earned 250 total points
ID: 36487526
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?
LVL 11

Accepted Solution

kbirecki earned 250 total points
ID: 36487611
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.?

Author Comment

ID: 36493632
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.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 10

Expert Comment

ID: 36493930
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!
LVL 11

Expert Comment

ID: 36494576
@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.
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 36522633
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"

LVL 11

Expert Comment

ID: 36523347
@shasunder, they don't have source code available.
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 36524164
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?
LVL 11

Expert Comment

ID: 36525381
@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.
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 36571647
My understanding is that there are no issues in the connection string. if there is connection string then the error message will be different.
LVL 100

Expert Comment

ID: 36998458
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question