ODBC table - save password

A

Adam

Hi All,

I have a database which has a few tables linked to an SQL server.

I have setup a system dsn called 'CSC Data Repository'.

When the database is opened i have a form open which links to a query.
So as it is looking at the odbc linked tables it prompts me for the
password each time.

Is there a way I can save the odbc password in the database so it
doesn't prompt me?

Many Thanks!

Adam
 
P

Pieter Wijnen

Create a passthrough Query (User_Tables)
SQL: SELECT * FROM INFORMATION_SCHEMA.Tables

in the connect property add: ODBC;DSN=MyDsn;UID=MyUID;PWD=MyPwd ' + other
relevant settings

Open the Query through a recordset before opening your form

You also can store the pwd if you use DoCmd.TransferDataBase to link the
tables or Change The Connect Property of the TableDef

HTH

Pieter
 
P

Pieter Wijnen

Create a passthrough Query (User_Tables)
SQL: SELECT * FROM INFORMATION_SCHEMA.Tables

in the connect property add: ODBC;DSN=MyDsn;UID=MyUID;PWD=MyPwd ' + other
relevant settings

Open the Query through a recordset before opening your form

You also can store the pwd if you use DoCmd.TransferDataBase to link the
tables or Change The Connect Property of the TableDef

HTH

Pieter


Adam said:
Hi All,

I have a database which has a few tables linked to an SQL server.

I have setup a system dsn called 'CSC Data Repository'.

When the database is opened i have a form open which links to a query.
So as it is looking at the odbc linked tables it prompts me for the
password each time.

Is there a way I can save the odbc password in the database so it
doesn't prompt me?

Many Thanks!

Adam



--
 
A

Adam

Ok I've done the pass through query and that works lovely.

But I'm unsure as to what you mean by 'Open the Query through a
recordset before opening your form' ? Can you explain this further
please?
 

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