How to access MS Access Database

zohagull
05-13-2001, 01:05 AM
If Ms Access databse is secures by setting password at database level, How would it be accessed thru DAO or ADO.
e.g some Access Databse "Test" with Database Password "Test"

zivavi
05-13-2001, 02:26 AM
Access is not secures by passward or username

Swissa
05-13-2001, 04:54 AM
If you are using DAO,then add a line like this

Data1.connect=";PWD=" & Password &";"

Where Data1 is the DAO object you are using , And Password is a string variable holding your Database Password

This line should be added before the Refresh Method

Yours:
Khalid

Neptune
05-14-2001, 02:09 AM
If you use ADO you should specify the password of the access database in the connection string.

Here is what I use to open my Access 2000 mdb file (abc.mdb) with password ABRACADABRA using Jet 4.0

Dim Cnn as String ' Cnn is the connection string
Dim sDatabasePath as String ' My database file

sDatabasePath= "C:\My databases\abc.mdb

sCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sDatabasePath & _
";Jet OLEDB:Database Password=ABRACADABRA;Persist Security Info=False"

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum