Click to See Complete Forum and Search --> : ReSOLVED : Access Database Security !
Alankar
Jun 24th, 2005, 07:11 AM
Hi All,
I have created a MDB having a LOGIN feature and there are different rights for different users.
Now this MDB is stored at Server in a secured folder with appropriate permissions. All the users with different rights are accessing this MDB on the LAN. For maintaining security I used a startup.. facility, disabled all menus, toolbars, hide database window etc.
But still there are some security threats.
1. If any user opens this database with pressing SHIFT key then all the Startup.. features are disabled. How can I prevent user to view database objects.
2. If user imports tables from that database to any database then also it should be prevented. How could I do these ?
Please suggest.
Regards,
Alankar
Mark Gambo
Jun 24th, 2005, 09:38 AM
Hi All,
I have created a MDB having a LOGIN feature and there are different rights for different users.
Now this MDB is stored at Server in a secured folder with appropriate permissions. All the users with different rights are accessing this MDB on the LAN. For maintaining security I used a startup.. facility, disabled all menus, toolbars, hide database window etc.
But still there are some security threats.
1. If any user opens this database with pressing SHIFT key then all the Startup.. features are disabled. How can I prevent user to view database objects.
2. If user imports tables from that database to any database then also it should be prevented. How could I do these ?
Please suggest.
Regards,
Alankar
Question #1 See the attached Project for Start-up ByPass Disabling. Question #2 if you have to use Access split you current Access Project into two parts: a Front End which contains Forms, Queries, Reports etc everything except the Tables and a Back End which will include all of the tables from your application. Set the Password for the Back End Database. Using the Linked Table Wizard link in the first table link all of the table from the Back End to the Front End. Now your databases are somewhat secured but anyone with a good knowledge of Access can get past there protections relative ease. These protections will prevent most casual users from geting into you data.
If you are concerned about data security you should consider scrapping Access for a more secure DB such as MS SQL and MySQL. Additionally, you may want to think about using a higher level language to program in such as VB6, ASP, etc.
One word about the attached Project, I have locked it so when you open it hold the shift key down you will notice that the form will be loaded and you will not be able to access the Objects (Tables, Queries, Reports, etc.). Click the Button to UnLock the Project and then exit the Application. Now hold the Shift Key down and you will notice that when the project loads you will have access to all Objects.
Now in your application you will need to secrete an object somewhere on a form in the project that will run the code to allow you to ByPass the startup form in case you need to make changes to the project.
Disable Startup Form ByPass Project (http://vbforums.com/showthread.php?t=346289)
Alankar
Jun 27th, 2005, 03:09 AM
Hi Mark,
As you suggested I created a new MDB and moved all my tables to this new MDB. In my existing MDB I deleted all tables and linked tables from the created MDB.
Now when I am using following code an error "Invalid Operation" occurs. What may be the reason?
*****************Code******************
'Enter session log to database Table : SessionLog
Set DB = CurrentDb()
Set rst = DB.OpenRecordset("SessionLog", dbOpenTable)
rst.AddNew
rst![LoginName] = LoginName
rst![StartTime] = Now()
rst![UserMachine] = ReturnComputerName
rst.Update
Set rst = Nothing
Set DB = Nothing
'SessionLog entered
***************Code******************
Thanks for your help,
Alankar
PS- I haven't used your Bypass Startup code.
Ecniv
Jun 27th, 2005, 03:54 AM
You need to close the recordset before setting to nothing.
The bypass key is in the help files (or was). It is a property of the database file, and you have to create it then set it. I have the two subs elsewhere, but the posted mdb probably covers them.
You now have two mdbs, one with data tables only and one with the forms etc.
You say you have linked the tables correctly, so try this:
Set rst = DB.OpenRecordset("SessionLog")
instead of the line you currently have.
Also use the debug and make sure it is the above line it is erroring on. It may be erroring on one of the other lines.
Alankar
Jun 27th, 2005, 04:46 AM
Hi Ecniv,
It is solved now, as you suggested I changed the line and it is working fine now.
Also I use DB.Close and rst.Close before setting them to Nothing.
Thanks a lot.
Regards,
Alankar
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.