In code AQL acces data from external database with password

G

Guest

I have an external database (Ms Database) protected with password. I want to
pass a SQL from current database. how can i pass the password;
For example: SELECT StudentsMaster.SurName
FROM StudentsMaster IN 'c:\Nestor\Nestor.mdb'; works if i had removed the
password protection From Nestor.mdb, but returns the error message "Not a
Valid password" if not.
 
G

Guest

Try:

SELECT StudentsMaster.SurName
FROM [;DATABASE=c:\Nestor\Nestor.mdb;PWD=MyPswd].StudentsMaster;

.. . . where MyPswd is the database password.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
G

Guest

Thank you

'69 Camaro said:
Try:

SELECT StudentsMaster.SurName
FROM [;DATABASE=c:\Nestor\Nestor.mdb;PWD=MyPswd].StudentsMaster;

. . . where MyPswd is the database password.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.


magioros said:
I have an external database (Ms Database) protected with password. I want to
pass a SQL from current database. how can i pass the password;
For example: SELECT StudentsMaster.SurName
FROM StudentsMaster IN 'c:\Nestor\Nestor.mdb'; works if i had removed the
password protection From Nestor.mdb, but returns the error message "Not a
Valid password" if not.
 

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