views:

132

answers:

2

I need to execute a SQL Query between two databases.

Example:

SELECT * from table1 in 'D:\paulo\sdatabases\SCWa.mdb'

The problem is that both tables have a password. How can i put the password in a query like this?

+1  A: 

You can link the table, if I remember correctly, you will have to give password once when creating the link.

Glenner003
Problem solved, thanks!
Paulo
+4  A: 

Use the same string as connect in your query, for example:

SELECT * FROM [MS Access;PWD=password;DATABASE=C:\Docs\LTD.mdb].Companies

Further information: http://support.microsoft.com/kb/113701

The above example is for a database password, not a security (mdw) password.

Remou
@onedaywhen The password in the example is a database password, not a security password, so your addition may lead to a little confusion. yesno?
Remou