Click to See Complete Forum and Search --> : Connecting VB5 to ORACLE


william400
10-30-2000, 02:16 PM
I'm trying to connect VB5 to Oracle8i locally. I don't want to use DSN (in ODBC) because I will distribute the app to the professor's PC and don't want to set it up.
I've figured out how to create a tablespace in Oracle that will save the tables to a file called, for example, myfile.one. I'm trying to communicate with myfile.one using ADO.

This is what I've come up with so far:

"Provider=MSDASQL; driver={Oracle8i ????}; Server = ???; Database = ????; UID=System;PWD= Manager"


Where do I get the driver named Oracle8i ? What do I put in Server= ? If I'm not using a DSN connection, then what do I put in Database= ?

Thanks for your help!!

anagarur
10-31-2000, 05:54 PM
Here is a DSN-less connection string.
Below: put your userid, password and oracle server name.
ex, UID= anagarur
PWD=annnap
SERVER = ntoracle.base.net
Leave the driver part as it is.

Cn = "UID=youruserid;PWD=yourpassword;driver=" _
& "{Microsoft ODBC for Oracle};SERVER=youroracleserver;"

Set Cn = New ADODB.Connection
With Cn
.ConnectionString = conn
.CursorLocation = adUseClient
.Open
End With

Hope this helps.