| | |
|
|
|
password related question |
| message from SomSallyX on 28 May 2004 |
Hi
I'm trying to write a simple viewer to display the tables and records in the
MS Access database.
Is there anyway i can know whether the database is password protected so
that i can ask for the password and supply it programmatically to the
database. (I'm using ADO/ADOX with VB)
Warm Regards
|
| George Nicholson replied to SomSallyX on 28 May 2004 |
There may be a more elegant solution, but what I have done in the past is to
try and access the db without a password and trap for a specific error: 3031
"Not a valid password" (using DAO). If that error is triggered, I prompt
the user for a password and try accessing the db again. Note that if the
password that the user supplies is incorrect, the same error is triggered.
In case the user doesn't know the password, be sure to provide a way out of
the otherwise endless loop.
|
|
Archived message: password related question (MS Access)