ODBC Linked tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I need the code that will enable me to run numerous Queries against linked
ODBC tables (Oracle 7.3) without having to enter a password each time.

I understand I need a connect string, but I cant figure out where it should
go.

My code looks like this:

strSQL = "SELECT * INTO RESULTS FROM ODBC_TABLE WHERE REFERENCE=1234;"

db.Execute strsql

Can somebody please let me know how to do this in simple steps.

Many Thanks,
Steve.
 
If using ADO, you can set the connectionstring property. Not sure how to do
with DAO, but check the help file for something similar.
 
I am using DAO, but good news! Ive cracked it!

Dim tdef As TableDef
Set db = CurrentDb
Set tdef = db.TableDefs("tblMPR_Tracker")
tdef.Connect = tdef.connect & "PWD=pass;"
tdef.RefreshLink

Thanks anyway,
Steve.
 
Back
Top