PDA

Click to See Complete Forum and Search --> : driver error


teddie
Aug 2nd, 1999, 06:29 AM
I'm using VB5 to connect to Oracle8 and am having a problem with my driver (Oracle 8.00.5). Here's the message from the immediate window:
0
IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
0
IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
0
20 Resume without error
IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
0
IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

I looked up the error and here's what I found:
IM006--Driver's SQLSetConnectOption failed--(returned by the Driver Manager)
During SQLConnect, the Driver Manager called the driver's
SQLSetConnectOption function and the driver returned an error. (Function
returns SQL_SUCCESS_WITH_INFO).

I don't really have a clue as to what to do next. Here's my connection code in VB if you need it:
Public Sub Main()
On Error GoTo connect_err

sOracleConnectString = "UID=" & msOracleUser & ";PWD=" &
msOraclePassword & ";Dsn=test"

With gcOracleConnection
.Connect = sOracleConnectString
.LoginTimeout = 60
.CursorDriver = rdUseClientBatch
.EstablishConnection prompt:=rdDriverNoPrompt
End With

MsgBox "You Are Connected The Database.", vbInformation +
vbOKOnly, "Phone Log Information"
If vbOK Then
frmSplash.Show
End If

connect_err:
Dim er As rdoError
Debug.Print Err, Error
For Each er In rdoErrors
Debug.Print er.Description, er.Number
Next er
Resume Next
End Sub

preeti
Aug 2nd, 1999, 05:38 PM
Hi,

The error means that something is wrong with the values that you are passing in your connection string: sOracleConnectString so...

1: Does your DSN exist? (Maybe a stupid question, but I have made this mistake before)

2: If your DSN exists, can you use it to connect to the database with another software ex: Excel?

3: What happens if you do not use the DSN? set the uid, pwd, server and driver properties in your connection string and omit the name of the DSN.

HTH,

Preeti

teddie
Aug 2nd, 1999, 09:00 PM
1. yes
2. yes, I used Access to connect to one of my tables.
3. Here's that error message:
40002 IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed 0
IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed 0
S1000: [Oracle][ODBC][Ora]ORA-12203: TNS:unable to connect to destination
12203
0
IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed 0
IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed 0
S1000: [Oracle][ODBC][Ora]ORA-12203: TNS:unable to connect to destination
12203
20 Resume without error
IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed 0
IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed 0
S1000: [Oracle][ODBC][Ora]ORA-12203: TNS:unable to connect to destination
12203