james2432
asked on
Oracle error occurred, but error message could not be retrieved from Oracle
I have a vb6 application that is trying to connect to a oracle database
my connection string:
"Provider=MSDAORA; Password=test; User ID=test ; Data Source = T; Persist Security Info=True"
I ran a tnsping on T and it works perfectly (and other applications can connect to T)
the error occurs when the connection is opened
my connection string:
"Provider=MSDAORA; Password=test; User ID=test ; Data Source = T; Persist Security Info=True"
I ran a tnsping on T and it works perfectly (and other applications can connect to T)
the error occurs when the connection is opened
On Error GoTo ErrorHandler
Dim conn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim RS As New ADODB.Recordset
conn.ConnectionString = ConStr
conn.Open
cmd.ActiveConnection = conn
cmd.CommandText = "select 1 from test"
cmd.CommandType = adCmdText
RS.Open cmdCommand
If RS.EOF = False Then
RS.MoveFirst
Do
MsgBox (RS.Fields(0))
Loop Until RS.EOF = True
RS.Close
End If
conn.Close
ErrorHandler:
MsgBox Err.Number & ": " & Err.Description
Resume Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I impressed
"saw nothing that really helps"
"saw nothing that really helps"
ASKER
@OMC2000
by that I mean I had already checked/tried to fix those errors and it amounted to nothing
by that I mean I had already checked/tried to fix those errors and it amounted to nothing
ErrorHandler:
MsgBox (conn.Errors(0).Descriptio
If top level error message is not informative enough, check all messages in errors collection
Also check if there are several Oracle homes, some of them may have no record for this database in tnsnames.ora