prevent mdb file from opening directly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • panther125
    New Member
    • Feb 2008
    • 1

    prevent mdb file from opening directly

    Is there any way to prevent my.mdb file to be open directly, I want to access it through C# programming only. Such as by changing the extension or any other way please suggest me.
  • DonRayner
    Recognized Expert Contributor
    • Sep 2008
    • 489

    #2
    Password protect the MDB file and have your C# program pass the password to the mdb when connecting to it. On the menu bar chose Tools-Security-Set Database Password.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32653

      #3
      I can add nothing to that perfect answer, except maybe, Welcome to Bytes!

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32653

        #4
        Another solution (not better, but an alternative) is to define a form to open automatically when the database is opened. Code in the form would close the database as soon as it's opened.

        Comment

        Working...