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

Connect to Oracle from Access w/ADO (not ODBC)

Status
Not open for further replies.

DavidTN

Programmer
Apr 16, 2001
9
US
I am trying to connect from Access to an Oracle 7.4 database and would prefer not to use ODBC (I am too old to wait for the data to return). Does anyone know ADO code to establish a connection to query Oracle tables/views?

Thanks
 
This is from VB6. It should work within Access.

Dim objConn As ADODB.Connection
Dim rsTmp As ADODB.Recordset
Dim strConnect as String
strConnect="Provider=OraOLEDB.Oracle.1;Password=some_password;Persist Security Info=True;User ID=User1;Data Source=DBname"


Set rsTmp = CreateObject("ADODB.Recordset")
Set objConn = CreateObject("ADODB.Connection")

objConn.Open sConnect

With rsTmp
.CursorLocation = adUseClient
.Open "Select * from some_table", objConn, adCursorType, adLockType
Set .ActiveConnection = Nothing
End With

Set CallingFunctionName = rsTmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top