Connect to Oracle using Microsoft ODBC for Oracle

K

Kent

I am developing an Excel workbook to be sent to many users on our company
network. I want to query our version 8.1.7 Oracle database.
Here is the beginning of the code I am using to make the connection:


Sub Get_Data()

Dim RecordSet As ADODB.RecordSet
Dim ConnectID As New ADODB.Connection
Dim User_ID As String
Dim Database As String
Dim Password As String
Dim Connection_Info As String
Dim i As Integer

On Error GoTo error_handler
Err.Clear

User_ID = DatabaseLogonForm.UserIDTextBox.Value
Password = DatabaseLogonForm.PasswordTextBox.Value

Connection_Info = "Driver={Microsoft ODBC for Oracle}; " & _
"CONNECTSTRING=(DESCRIPTION=" & _
"(ADDRESS=(PROTOCOL=TCP)" & _
"(HOST=server1.ccf.sw.org)(PORT=1521))" & _
"(CONNECT_DATA=(SERVICE_NAME=test))); uid =" & _
User_ID & ";pwd=" & Password & ";"

ConnectID.Open (Connection_Info)


When i run the code I get the following error:

"The Oracle(tm) client and networking components were not found. These
components are supplied by Oracle Corporation and are part of the Oracle
version 7.3 (or greater) client software installation. You will be unable
to use this driver until these components have been installed."

I don't want to have to visit each desktop to load drivers. I assuemd the
Mocrosoft Oracle driver would work. Any suggestions?

Thank you in advance.
 
T

Tim Williams

Your client machines will need the Oracle client/nw files installed.
No way around it I'm afraid.

Tim.
 
T

Todd M

Hi Kent,
Tim is correct, the Oracle client software is required. Some folks install
the client on many machines. I usually store the workbook on the network, and
then have someone refresh and distribute the report as required.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top