apply user security to an access db using VB

L

Lothar Geyer

I have a VB project using an access 2k database. The database is
protected by a password. Is there a way to modify the database by VB
program to use the user based security model?

In detail (as I am new to this kind of access security):
The actual version of my app uses an access 97 database, secured by a
password. With the next version of my app the database will be updated
to access 2k (Jet4.0) during installation. That's already working. As I
want to offer replication too (which is not possible with a password
secured database), I have to switch to user based security. So during
installation of the new version of my app I want to update the database
and add all known users (available in the database) to the (database
specific) workgroup file. How to do that?

Additional questions to enhance understanding:
1) the workgroup admin utility creates a new default workgroup file? Or
can I create a workgroup file which will be used only with the database
of my app?

2) My app uses ADO to access the database. However, there are some older
(not jet updated) parts using DAO. Will there be any problems when
moving to user based security?

3) I converted a test database to user based security using the
assistant in access and creating a new (not default) workgroup info
file. But I am not able to open this database with my app. The commands
to open are:

Set CNN = New ADODB.Connection
With CNN
.Provider = "MSDataShape.1"
.Properties("Extended Properties") = "Jet OLEDB:Database Password="
& dbpw
.Properties("Data Source") = actDatabase
.Properties("Data Provider") = "MICROSOFT.JET.OLEDB.4.0"
.Properties("Jet OLEDB:System Database") = tmpStr
.Properties("Persist Security Info") = False

.Open
End With

The error is raised at the System Database property.

Lothar Geyer
 
L

Lothar Geyer

Hi,
I think most of your questions will be answered in the SECFaq
Security FAQ, it includes sample code too.
I studied the FAQ - and a lot of articles in the net. But I cannot find
anything regarding my initial question:

I have a VB project using an access 2k database. The database is
protected by a password. Is there a way to modify the database by VB
program to use the user based security model? The only hint is with the
ADO connetion string: "Jet OLEDB:Create System Database:TRUE". But I
need to do it with DAO.

Lothar Geyer
 

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