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

Posted on 2009-02-24
Last Modified: 2013-12-18
I am using a simple application to check the connection from VB6 to Oracle 10g and I getting this error  and these are the connection parameters I entered as
 Global Const Oracle_Conn= "Provider=OraOLEDB.Oracle;User id=xxxx;password=xxxx;Data Source=xxxx999;initial catalog=DVDB01;Fetch Size = 200; CacheType=File;"
and this the code I wrote for fetching the data . Can anyone please tell me where I am going wrong as earlier I  had another issue so I un-installed Oracle and re-installed it but since then
I am getting this porblem.  Anyhelp would be greatly appreciated .
Private Sub Command3_Click()

Call get_Oracledata

End Sub

Private Sub get_Oracledata()

 Dim cnn As New ADODB.Connection

 Dim rst As New ADODB.Recordset

 Dim strSQL As String


 Set cnn = New ADODB.Connection


 cnn = Oracle_Conn

 'cnn.CommandTimeout = 400    ' added


 MsgBox "conn open now"


 strSQL = "Select count(*) from tbl_T108"

 rst.Open strSQL, cnn

      If (rst.RecordCount > 0) Then

         MsgBox " true"


          MsgBox " False"

      End If



End Sub

Open in new window

Question by:Radhs74
    LVL 4

    Expert Comment

    Where is the string Oracle_Conn?
    You have to make cnn.connectionstring = (something) before openning. Isn't it!

    and this you have to SET it like this:
    SET cnn = New ADODB.Connection
    .. not to define it like the recordset.
    Verify if this the reason!  Otherwise I have to go to the manual to refresh the proper procedure.


    LVL 14

    Expert Comment

    Few points to consider.
    1.  If possible, use Microsoft ODBC for oracle.
    2.  If the above does not work, try to create USER DSN instead of connection string to check the compatibility, if this works, it can certainly be worked using connection string

    Author Comment

    Let me try and get back to you


    Author Comment

    I got the issue solved by myself actually I am supposed to give the database name as the datasource
    and not servername


    Accepted Solution

    Question PAQ'd, 500 points refunded, and stored in the solution database.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    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…
    This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
    This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

    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

    11 Experts available now in Live!

    Get 1:1 Help Now