Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLSetConnectAttr HELP

Status
Not open for further replies.

saw15

Technical User
Jan 24, 2001
468
US
Good day,

Using VB 6.0, Win2000.

I have recently inherited a project that was designed in VB6.0, Win95 in 1999.

Using VB Prof Edition, I open the project and try to login but am getting an error:

Microsoft OLD DB Provider for ODBC Drivers reported 0. [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed.

End of Error:

Here is the code that is trying to establish the connection.

Set mconn = New ADODB.Connection
mconn.ConnectionString = _
"PROVIDER=MSDASQL;" _
& "driver={Microsoft ODBC for ORACLE};" _
& "SERVER=" & user1.userHSDInstance_str & ";" _
& "uid=" & user1.userHSDnm_str & ";" _
& "pwd=" & user1.userHSDps_str

mconn.Open

Please .. any help is greatly appreciated.

SAW
 
Provider and Driver are the same thing depending on which driver you want to use.
If your database is Oracle use:

"PROVIDER=MSDAORA;" _ &
"data source=" & user1.userHSDInstance_str & ";" _
"user id=" & user1.userHSDnm_str & ";" _
"password=" & user1.userHSDps_str


"driver={MICROSOFT ODBC FOR ORACLE};" & _
";server=" & user1.userHSDInstance_str & _
";uid=" & user1.userHSDnm_str & _
";pwd="& user1.userHSDps_str
 
Thanks..

Few questions.. should I be using the entire statement? Both parts? Or should I only be using the top part?

Is any of this a Win2000 issues dealing with the MDAC?

Thanks..

SAW
 
There are two drivers you can use.
1)MSDAORA - Try to use this one
2)Microsoft ODBC For ORACLE
Choose one of the two. The reason I posted 2 strings, is that the syntax is different.

As far as MDAC, not that I have encountered.
 
Thanks for the info, worked great.

Appreciate it very much.

SAW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top