Joining two databases (with password)

J

Jeremy Collins

Hi all,

In Access, it's possible to query data from a table in another
Access file, using this syntax:

SELECT * FROM tb_table IN 'c:\folder\db_file.mdb'

Does anyone have an example of how to provide the password for
the second database? In an ADO connection string I'd use
'Jet OLEDB:DatabasePassword=XYZ', but I can't figure out how to
do it with Jet SQL.

Cheers,
 
J

Joseph Meehan

Jeremy said:
Hi all,

In Access, it's possible to query data from a table in another
Access file, using this syntax:

SELECT * FROM tb_table IN 'c:\folder\db_file.mdb'

Does anyone have an example of how to provide the password for
the second database? In an ADO connection string I'd use
'Jet OLEDB:DatabasePassword=XYZ', but I can't figure out how to
do it with Jet SQL.

Cheers,

Have you considered user level security?

I suggest you start by reading
http://support.microsoft.com/default.aspx?scid=kb;[LN];207793

Access security is a great feature, but it is, by nature a complex product
with a very steep learning curve. Properly used it offers very safe
versatile protection and control. However a simple mistake can easily lock
you out of your database, which might require the paid services of a
professional to help you get back in.

Practice on some copies to make sure you know what you are doing.
 
O

onedaywhen

Jeremy said:
In Access, it's possible to query data from a table in another
Access file, using this syntax:

SELECT * FROM tb_table IN 'c:\folder\db_file.mdb'

Does anyone have an example of how to provide the password for
the second database? In an ADO connection string I'd use
'Jet OLEDB:DatabasePassword=XYZ', but I can't figure out how to
do it with Jet SQL.

Try this:

SELECT * FROM
[MS Access;
c:\folder\db_file.mdb
;pwd=mypassword;].tb_table;

Jamie Collins.

--
 

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