• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1800
  • Last Modified:

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

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 .
Thanks
Radhs
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
 cnn.Open
 MsgBox "conn open now"
 
 strSQL = "Select count(*) from tbl_T108"
 rst.Open strSQL, cnn
      If (rst.RecordCount > 0) Then
         MsgBox " true"
      Else
          MsgBox " False"
      End If
  rst.Close
  cnn.Close
End Sub

Open in new window

0
Radhs74
Asked:
Radhs74
1 Solution
 
abd00nCommented:
Hi,
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.

Regards;;

0
 
ajexpertCommented:
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
0
 
Radhs74Author Commented:
Let me try and get back to you

Thanks
Radhs
0
 
Radhs74Author Commented:
I got the issue solved by myself actually I am supposed to give the database name as the datasource
and not servername

Thanks
Radhs
0
 
ee_autoCommented:
Question PAQ'd, 500 points refunded, and stored in the solution database.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now