Solved

VB6 trace error

Posted on 2011-09-06
12
380 Views
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"
0
Comment
Question by:AnnaJames77
  • 4
  • 3
  • 2
  • +2
12 Comments
 
LVL 10

Assisted Solution

by:plummet
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?
0
 
LVL 11

Accepted Solution

by:
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.?
0
 

Author Comment

by:AnnaJames77
ID: 36493632
thankyou plummet &  kbirecki for your replies.
The error msg is :
-2147217887
multiple step OLEDB operation generated errors. check each oledb status value, if available. no work was done.
0
 
LVL 10

Expert Comment

by:plummet
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!
0
 
LVL 11

Expert Comment

by:kbirecki
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):
     HKEY_CLASSES_ROOT\CLSID\{0C7FF16C-38E3-11d0-97AB-00C04FC2AD98}
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.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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
60  
180  statementn
190 exit sub
command1_Click_Error
200    MsgBox "Error " & Err.Number & " (" & Err.Description & " in Line " & Erl & " (" & Err.Description & ") in procedure command1_Click of Form frmprocess"

 
0
 
LVL 11

Expert Comment

by:kbirecki
ID: 36523347
@shasunder, they don't have source code available.
0
 
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?
 error
0
 
LVL 11

Expert Comment

by:kbirecki
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.
0
 
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.
0
 
LVL 100

Expert Comment

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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now