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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to Oracle what should be the provider Name ?

Status
Not open for further replies.

getsathya

Programmer
Mar 12, 2001
2
0
0
IN
I have Oracle 7.3 Installed on my machine.
I am doing ADO programming in VB to connect to a database on this.
What should I write for the Provider ?

conobj.provider = ?

I can connect to MS SQL server by giving "SQLOLEDB"
 
Cn.open "Driver={Microsoft ODBC for Oracle};" & _
"Sever=OracleServer.World;" & _
"Uid=;Pwd=;"

you might have to use
Driver={Microsoft ODBC Driver for Oracle}

 
getsathya -

Don't forget to install the Oracle client. The Microsoft OLEDB/ODBC/ADO/TLA drivers use them.

Chip H.

 
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset

cn.Open "Provider=MSDAORA;Data Source=DatabaseAlias;User ID=UserID;Password=UserPassword"

'OLE DB connection

rs.CursorLocation = adUseClient

rs.Open "TableName", cn, adOpenStatic, adLockReadOnly, adAsyncFetch


If cn.State = adStateOpen Then
MsgBox "opened oracle"
End If

This is what I use.

Hope it helps,

Parke
 
Also, when using the oracle ODBC driver you need to pass a DBQ= and a SERVER=
The Microsoft ODBC for Oracle works with only SERVER=

dsn="Driver={Oracle ODBC Driver};DBQ=test;SERVER=test;uid=scott;pwd=tiger;"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top