title: MS-Access ODBC Connection to Oracle for SQL
body: <p>I'm trying to connect to an Oracle Database with Access 2003.</p>
  
  <p>I want to use an ODBC connection and I want to set it up so that the user doesn't need to enter a password. </p>
  
  <p>One of the problems I am having though is my sql query uses INTERFACE.Products and Access sees the period and thinks I'm trying to opening a file. IE Interface.MDB, when thats a part of my sql query.</p>
  
  <pre><code>Option Compare Database
  
  Function OracleConnect() As Boolean
  
      Dim ws As Workspace
      Dim db As Database
      Dim LConnect As String
      Dim myQuery As String
      Dim myRS As Recordset
  
  
      On Error GoTo Err_Execute
  
      LConnect = "ODBC;DSN=Oracle;UID=user;PWD=password;"
  
      'Point to the current workspace
      Set ws = DBEngine.Workspaces(0)
  
      'Connect to Oracle
      Set db = ws.OpenDatabase("", False, True, LConnect)
  
      myQuery = "Select * from INTERFACE.Products"
  
      Set rst = db.OpenRecordset(myQuery)
  
  
      rst.Close
      db.Close
  
  
      Exit Function
  
  Err_Execute:
      MsgBox MsgBox("Error Number:  " &amp; Err.Number &amp; " Message: " &amp; Err.Description)
  
  End Function
  </code></pre>