Results 1 to 3 of 3
  1. #1
    Jose Martinez is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2016
    Posts
    3

    Connecting Access to oracle

    hi

    Access Version 2010

    I have an Access Db with linked tables to an Oracle DB and when I try to open connection Oracle ODBC Driver Connect is always asking me about a user name and password

    So I had create a new connection whit ODBC data source but I can fill just the user name automatically, and not the password



    I want to know how to fill paremeters using VBA when database opens the first time


    thanks and have a nice day
    Attached Thumbnails Attached Thumbnails Capture.PNG  

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    You can create your own form instead of relying on the external prompt and fill it in with the appropriate values then reconnect using the form input. Then connect using a connection string/tabledef update.

  3. #3
    Jose Martinez is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2016
    Posts
    3

    Red face Found it

    Quote Originally Posted by rpeare View Post
    You can create your own form instead of relying on the external prompt and fill it in with the appropriate values then reconnect using the form input. Then connect using a connection string/tabledef update.


    Thanks I found this and it works fine
    Public Function OracleConnect() As Boolean
    Dim ws As Workspace
    Dim db As Database
    Dim LConnect As String
    On Error GoTo Err_Execute

    LConnect = "ODBC;DSN=XXXX;UID=XXXXX;PWD=XXXXXX;SERVER=XXX XX"
    Set ws = DBEngine.Workspaces(0)
    Set db = ws.OpenDatabase("", False, True, LConnect)

    Exit Function
    Err_Execute:
    MsgBox "Connecting to Oracle failed."
    OracleConnect = False
    End Function

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 11-21-2015, 04:39 PM
  2. Help Converting Oracle PL/SQL Query into Access
    By RThomas321 in forum Queries
    Replies: 5
    Last Post: 11-15-2014, 12:35 PM
  3. Load csv data to Oracle through Access
    By acces2oracle in forum Access
    Replies: 1
    Last Post: 10-24-2011, 02:41 PM
  4. Converting access to oracle
    By wthoffman in forum Access
    Replies: 0
    Last Post: 03-08-2011, 11:05 AM
  5. Oracle Discoverer to MS Access
    By money_213 in forum Import/Export Data
    Replies: 0
    Last Post: 06-27-2006, 12:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums