
SECURITY: VB 4.0 16-bit and Access 2.0
Hi,
I've been attempting to secure the database that is part of a system I'm
working on. I have followed all of the instructions in the document
"Microsoft Access Version 2.0 Security", by George Snelling, and have hit
what seems to be a bit of a snag.
I have been through the exercise of creating the .mda file and putting in a
new user. I then added the new user to the Admins group and removed the
Admin account from this group too. After logging into the database as the
new user I ran the Security Wizard which has given me a new secure and
encrypted database where the new user owns everything.
I have placed the following code in the program's .ini file:
[Options]
SystemDB=D:\DQA\MDB\DQA.MDA
Here, too, is the snippet of code from within the VB 4.0 16-bit program
that I am using to create my workspace:
DBEngine.IniPath = "C:\WINDOWS\DQA.INI"
Set m_WS = DBEngine.CreateWorkspace(sWorkspaceName, sDefaultUser,
sDefaultPassword)
where sWorkspaceName, sDefaultUser and sDefaultPassword as all string
parameters passed into the routine in which this call resides.
The problem you ask? I am able to login to the database by launching
Access and entering the password. But, when done programmatically through
the above code, I am only ever getting the following error:
3029, Not a valid account name or password.
Hmm... Now I've read various other acticles and none of them really seem to
be very specific on how one uses the 16 bit version of VB as compared to
the 32-bit. I read an article on VB3 which seemed to be using some sort of
Set... command to get the .ini set and then to create the workspace.
Should I be using this?
Any help would be greatly appreciated. Thanks,
-----------------------------------------------------------------
Scott McBride