We help IT Professionals succeed at work.

What is the cause of this error message from our Oracle client?

dk02151
dk02151 asked
on
We are using ADO and the Microsoft OLE DB Provider for Oracle in a VB 6 application. Occasionally the application receives the following error while connecting to Oracle:

"Oracle error occured, but message could not be retrieved from Oracle."

The error number is -2147467259

Generally, reinstalling the OS and the applications fixes the problem. However, there a few few PCs where this does not seem to help. Has anyone ever figured out what cxauses this error to occur or how to fix it? We have tried reinstalling MDAC using Microsoft's component checker, but this does not help. Is the a DLL in particular that can cause this error to occur?
Comment
Watch Question

Commented:
From the M$ KnowledgeBase:

ERROR NOTES
Only the ADO Connection object has an errors collection. The observant reader will notice that a lightweight error handler is in effect for the RecordSet.Open examples. In the event of an error opening a RecordSet object, ADO should return the most explicit error from the OLEDB provider. Some common errors that can be encountered with the preceding code follow.

If you omit (or there is an error in) the DefaultDir parameter in the connect string, you may receive the following error:
ADO Error # -2147467259
Description [Microsoft][ODBC Microsoft Access 97 Driver] '(unknown)'
isn't a valid path. Make sure that the path name is
spelled correctly and that you are connected to the server
on which the file resides.
Source Microsoft OLE DB Provider for ODBC Drivers

If there is an error in the Dbq parameter in the connect string, you may receive the following error:
ADO Error # -2147467259 Description [Microsoft][ODBC Microsoft Access 97 Driver] Couldn't find
file '(unknown)'.
Source Microsoft OLE DB Provider for ODBC Drivers

The preceding errors also populate the Connection.Errors collection with the following errors:
ADO Error # -2147467259
Description [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed
Source Microsoft OLE DB Provider for ODBC Drivers

ADO Error # -2147467259
Description Login Failed
Source Microsoft OLE DB Provider for ODBC Drivers
Note that for each error, the ADO Error number is the same, in this case translating to 0x80004005, which is the generic E_FAIL error message. The underlying Component did not have a specific error number for the condition encountered, but useful information was never-the-less raised to ADO.


 






http://support.microsoft.com/support/kb/articles/Q168/3/36.asp?LN=EN-US&SD=gn&FR=0&qry=error%202147467259&rnk=10&src=DHCS_MSPSS_gn_SRCH&SPR=MSALL


Good luck!!


Commented:
Install the service pack 5 for vb6 (it really fix it). The problem is the MDAC (ODBC AND ADO) of your version that is not compatible with the ODBC of oracle that you're using. I had the same problem with an adodb connection to sql server.

 Salu2
   Maestro

Commented:
Recently, I encountered this problem. I use a VB6sp5 frontend with the latest MDAC drivers(2.70) and an Oracle 8 db on NT4. I think it is the amount of rows being returned from the query. I use a stored procedure and can specifiy some parameters, etc. So depending on the range of parameters (dates in fact) more or less results/rows are returned. However, I tried this on an Win2K PC and experienced no problems at all - it worked fine for my problem dates.

If any one has any other ideas/comments/experience with this please post them.
Thanks.

Commented:
Recently, I encountered this problem. I use a VB6sp5 frontend with the latest MDAC drivers(2.70) and an Oracle 8 db on NT4. I think it is the amount of rows being returned from the query. I use a stored procedure and can specifiy some parameters, etc. So depending on the range of parameters (dates in fact) more or less results/rows are returned. However, I tried this on an Win2K PC and experienced no problems at all - it worked fine for my problem dates.

If any one has any other ideas/comments/experience with this please post them.
Thanks.

Author

Commented:
We recently found one source of the error. If different versions of OCIW32.DLL exist in the Oracle\BIN directory and the Winnt\system32 directory this error can occur during the Connection.Open statement. However, this does not account for all occurances of the "unknown error". I think I need to add some more information on this point. One of the occurances that we can't account for occurs when we try to connect to two different data sources. The first one is an imaging services database from FileNet Corporation. It connects through its own desktop client to an Oracle database. I am not sure what kind of connection it is making when we log into the server, but if we need to query any of the Oracle tables we have to make an ADO connection in addition to the Library connection. The second data connection is to our own Oracle database. When the FileNet coonection is made we sometimes error during the connection to our own database. If we reverse the connectin order the error does not occur. The connection code looks like the following:


    Dim objLibrary As IDMObjects.Library
    Dim objConnection As ADODB.Connection
   
    ' FileNet image services Library connection
    Set objLibrary = New IDMObjects.Library
   
    If Not (objLibrary.GetState(idmLibraryLoggedOn)) Then
        objLibrary.Logon "loader", "", , idmLogonOptNoUI
    End If
   
    ' Our Oracle databse connection.
    Set objConnection = New ADODB.Connection
    With objConnection
        .ConnectionString = "Provider=MSDAORA; Data Source=fd35;User ID=cruser;Password=cruser"
        .CursorLocation = adUseClient
        .Open
    End With

This situation seems to be cleared up by re-installing the OS and the applications.

Commented:
Just to let you know, I used a Server side cursor location and my problem was resolved. In my case it was the volume of records returned that resulted in the error, so the server side cursor solves that problem.

Commented:
Just to let you know, I used a Server side cursor location and my problem was resolved. In my case it was the volume of records returned that resulted in the error, so the server side cursor solves that problem.
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20159220.html
http://www.experts-exchange.com/questions/Q.20190264.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

Author

Commented:
We found conflicting dlls between the Oracle directory and the system32 directory. All other cases are resolved by reinstalling the OS.
Was pending deletion, but will move to PAQ at zero points instead, to help others.  200 points refunded, item closed.
Moondancer - EE Moderator