Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2005
    Posts
    2

    Exclamation Unanswered: Locking MS Access file

    Hi all,

    I am developing an application with Visual Basic .NET that uses MS-Access as its database and I would like to protect it from being viewed/edited.

    The mdb file would be encrypted before the application initializes and after closing it. The problem is while the application is running, the database file is decrypted and could be accessed and edited. I realize that there is no easy way to integrate the mdb file into the EXE file of the application (unless using a third-party package), but I think there is a way to set a lock on the database, without a password (or just a way to lock the database for this particular application)

    Could someone help me, please?

    Cheers,

    mikimr

  2. #2
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Did you try Hiding the database window? In the Tools menu of the MS Access database, click on Startup. On the right side of the dialog box, uncheck the Display Database Window checkbox. That will prevent the database from being viewed. Most users don't know how to UnHide the window.

    Sam

  3. #3
    Join Date
    Mar 2003
    Posts
    130
    Quote Originally Posted by Sam Landy
    Did you try Hiding the database window? In the Tools menu of the MS Access database, click on Startup. On the right side of the dialog box, uncheck the Display Database Window checkbox. That will prevent the database from being viewed. Most users don't know how to UnHide the window.

    Sam
    That's easy to get around by holding down the Shift key when the database is opened.

    Better than that would be to use the Set Database Password feature. Is there some reason you don't want to use a password? I've heard it's pretty easy to crack.

    Another way is to administer the database through a workgroup file. The process is a little complicated and I don't have time to explain it right now. There's the Access help file and I can give you more info. tomorrow. Basically, you can restrict any user that doesn't have permission from opening the database. You can set other permissions as well for users and groups.

    I don't know how prone this is to cracking.

  4. #4
    Join Date
    Jan 2005
    Posts
    2
    The reason I don't want to use a password is because I'm using some sort of hardware that it's all purpose is not to have any passwords set.
    But I will try to administer it as you mentioned.

    Thanks for your help.

  5. #5
    Join Date
    Nov 2003
    Posts
    167
    Why not compile this into an mde whose password is compiled into your vb application? There is no mde decompiler I can find (and I have been looking) - so chances are you're safe. Of course, your user will need read/write access to the directory containing the database because access has to write the ldb file to that directory when the db is opened. This creates the somewhat silly predicament that the user may not be able to view or alter the data in your db, but nothing prevents him/her from deleting it altogether.

    Strangely enough, MS has had the ability to fix this limitation for some time by allowing the location of the ldb file to be specified as a setting of the db.

  6. #6
    Join Date
    Mar 2003
    Posts
    130
    On an NTFS volume you can specify that the user have only read/write access with no delete. This will allow the user to write the ldb file but not delete the mdb.

  7. #7
    Join Date
    Mar 2003
    Posts
    130

  8. #8
    Join Date
    Nov 2003
    Posts
    167
    Wey97,

    What happens when the user exits and the system attempts to delete the ldb file?

  9. #9
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    If you open the database Exclusively then no one else can use it.

  10. #10
    Join Date
    Mar 2003
    Posts
    130
    Quote Originally Posted by onansalad
    Wey97,

    What happens when the user exits and the system attempts to delete the ldb file?
    Nothing.
    The ldb file is still there but you won't get any errors. The ldb will be reused when the database is opened again.

    Quote Originally Posted by DCKunkle
    If you open the database Exclusively then no one else can use it.
    That would be a very good solution unless it's multi-user.

Posting Permissions

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