Results 1 to 3 of 3

Thread: Connecting to oracle????

  1. #1

    Thread Starter
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138

    Wink

    Aye Up Everybody,

    I've written a small application to transfer data from .txt file on a server into an axcess database, all was good and well, But now I need to use the same prgram to connect to an oracle database and I just can't get it to work.
    I'm using the following line of code ( The oracle database also has a username and password which will need to be incorporated aswell???)

    Set DBconnect = Workspaces(0).OpenDatabase("D:\Oracle\Ora81\BIN\SQLPLUSW.EXE ")

    The error message saise "unreccognisable database format"
    Whatever the hell that means

    Cheers 'n' beers ( and a big shout out to the manchester massif in de area - SKEEN
    "It wasn't the booze that made me snooze, It was the Gin that did me in!"

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Leavenworth KS USA
    Posts
    482
    Assuming you have Oracle drivers installed (if not, see MSDN Q140255), here's an ADO snippet to open your connection:
    Code:
    'Replace <User ID>, <Password>, <Server> with appropriate parameters.
    Dim Conn As String
    Dim Cn As ADODB.Connection
      Conn = "UID=*****;PWD=*****;driver={Microsoft ODBC for Oracle};SERVER=dseOracle;"
      Set Cn = New ADODB.Connection
      With Cn
        .ConnectionString = Conn
        .CursorLocation = adUseClient
        .Open
      End With
    A different tact that will save you time, should your Oracle table have less than 500K rows, would be to setup a DSN on your local machine and then link the Oracle table(s) within your existing Access db; then use your current code, as is.

    Hope this helps

  3. #3

    Thread Starter
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138
    Certinly did!
    Cheers
    "It wasn't the booze that made me snooze, It was the Gin that did me in!"

Posting Permissions

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



Click Here to Expand Forum to Full Width