Results 1 to 5 of 5

Thread: ReSOLVED : Access Database Security !

  1. #1

    Thread Starter
    Member Alankar's Avatar
    Join Date
    Jun 2005
    Location
    Ghaziabad, India
    Posts
    40

    Resolved ReSOLVED : Access Database Security !

    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
    Last edited by Alankar; Jun 27th, 2005 at 04:47 AM.
    The rest of mind is not in rest, It rests in rest.

  2. #2
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Access Database Security !

    Quote Originally Posted by Alankar
    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
    Last edited by Mark Gambo; Jun 25th, 2005 at 05:47 AM.
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  3. #3

    Thread Starter
    Member Alankar's Avatar
    Join Date
    Jun 2005
    Location
    Ghaziabad, India
    Posts
    40

    Unhappy Re: Access Database Security !

    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.
    The rest of mind is not in rest, It rests in rest.

  4. #4
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Access Database Security !

    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:
    Code:
    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.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  5. #5

    Thread Starter
    Member Alankar's Avatar
    Join Date
    Jun 2005
    Location
    Ghaziabad, India
    Posts
    40

    Wink Re: Access Database Security !

    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
    The rest of mind is not in rest, It rests in rest.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width