|
-
Sep 10th, 2001, 07:14 AM
#1
Thread Starter
Lively Member
Securing VB created Access DB...
Hi,
I have an VB app. which creates an Access .mdb file using the "CreateDatabase" command. Unfortunatley anyone can access this DB in access using the default admin workgroup.
Is there anyway I can secure any DB's created within my app this way, to stop the DB from being opened in access using the default admin. workgroup which is used by Access?
Thanks in advance,
-
Sep 10th, 2001, 07:30 AM
#2
Registered User
Here is how to do it:
1. Create a new workgroup with Wrkgadm.exe, call it DBSecurity.mdw.
2. Create a new db while connected to your new wrkgroup.
3. Go into Tools\Security
4. Add a new user call it your name, and a group call it Developers.
5. Make yourself a member of the groups: admins and Developers.
6. Change the log on for admin to something else you can remember.
7. Close Access.
8. Create a second new db, log on as yourself.
9. Import all the objects from the database you are trying to secure.
10. Go into Tools\Security again
11. Add permission to all objects to the group developers.
12. Remove all permissions for all objects for the user: admin, and the groups: users and admins.
You should now have a secure database. As a check run Wrkgadm.exe again and join the system.mdw again. Try to open the database. If it lets you in without having to log on, the db isn't secure. Go back and start to step 1 again.
Then you can add your own custom groups and users. Make sure you allocate permissions to groups and not users.
-
Sep 18th, 2001, 10:44 AM
#3
Thread Starter
Lively Member
Not sure I explained what I was trying to do well enough Nucleus.
My VB app. will run on PCs which do not have MS Access installed on them which is why Access DB's is created under my VB app. using the "CreateDatabase" method.
So, what I need to do is somehow secure any Access Db's created under VB using the "CreateDatabase" method so that users can't open any of these created Access DB's on a PC with Access installed.
-
Sep 18th, 2001, 05:43 PM
#4
Registered User
Essentially you join an MDW and then execute the create database method from there and fix up permissions programatically. You can do everything from creating groups to adding user permissions all via code.
The important thing is which MDW you are connected to when you execute the create database method.
-
Sep 19th, 2001, 05:24 AM
#5
Thread Starter
Lively Member
Yeah but I don't know how to do that in code. Can you give me any pointers or even a working example or something like that?
Thanks in advance,
Xan.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|