ODBC Linked tables

F

FBxiii

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.
 
M

[MVP] S.Clark

If using ADO, you can set the connectionstring property. Not sure how to do
with DAO, but check the help file for something similar.
 
F

FBxiii

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top