Linking to Oracle Tables programatically

  • Thread starter Thread starter Vandana
  • Start date Start date
V

Vandana

In my Access 97 application, I am using 3 Oracle tabels
which are linked using usual steps i.e. file->Get External
data->Link Tables. By using such links means some how we
have hard coded the tables. But i want to link these
tables programatically so that the process is automated if
username/password@dbname gets changed any time..
I want to write code for creating these links for my own
connect string. I m using system DSN for connecting to
Oracle.
 
Hi,

Try looking into the TransferDatabase method of the Docmd Object.

For example:

DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;DSN=DataSource1;UID=User2;PWD=www;LANGUAGE=us_english;" _
& "DATABASE=pubs", acTable, "Authors", "dboAuthors"

HTH

--

Cheers
Mark

Free Access/Office Add-Ins at:
http://mphillipson.users.btopenworld.com/
 
Back
Top