In code AQL acces data from external database with password

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top