+ Reply to Thread
Results 1 to 3 of 3

Connect to Oracle using Microsoft ODBC for Oracle

  1. #1
    Kent
    Guest

    Connect to Oracle using Microsoft ODBC for Oracle

    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.



  2. #2
    Tim Williams
    Guest

    Re: Connect to Oracle using Microsoft ODBC for Oracle

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

    Tim.




    "Kent" <[email protected]> wrote in message
    news:[email protected]...
    >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.
    >




  3. #3
    Todd M
    Guest

    Re: Connect to Oracle using Microsoft ODBC for Oracle

    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.
    --
    Todd Magnuson


    "Tim Williams" wrote:

    > Your client machines will need the Oracle client/nw files installed.
    > No way around it I'm afraid.
    >
    > Tim.
    >
    >
    >
    >
    > "Kent" <[email protected]> wrote in message
    > news:[email protected]...
    > >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.
    > >

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1