locked
Access Database Encryption Question? RRS feed

  • Question

  • I noticed when I copy my access database to another network drive I get a warning that my database will lose it's encryption if copied to another drive. That made me wonder if it would lose the encryption during an installation to another computer?

    Thursday, June 25, 2009 4:44 PM

Answers

  • Hello StevenC1976

    I had got your problem wrong! I thought you only encrypted using the password in Access.

    Now that I understood you are using file encryption, here is what we can do:

    - When using file encryption on a computer, the file is actually encrypted using the certificates you have on that computer.
      So, yes, when we try to copy that file to another computer, we lose the encryption on it.

    - However, you mentioned that you wanted to use encryption on your file when you install it somewhere.
      We can do so by calling a small program that makes use of the function File.Encrypt() in the System.IO class.
      Once you have installed your app and copied the access mdb file, just call File.Encrypt("<FilePath of mdb>") and your access file will be encrypted.
      In case you want to decrypt the file later, you can use the File.Decrypt("<FilePath of mdb>") function.

    Hope this helps!


    Have a great day!
    Amar
    • Marked as answer by StevenC1976 Tuesday, July 7, 2009 1:11 AM
    Wednesday, July 1, 2009 9:31 AM

All replies

  • Not sure. Ask the Access community to find out.
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful. This posting is provided "AS IS" with no warranties, and confers no rights.
    Visual C++ MVP
    Thursday, June 25, 2009 6:03 PM
  • Hi StevenC1976

    I tried copying an encrypted access database (Access 2003) to a network drive and did not lose encryption on it.
    I also tried reading the database from a C# app and succeeded only when I gave the correct password.

    Could you please let me know what version of Access are you using and also a little more details of the issue?

    Regards,
    Amar
    Thursday, June 25, 2009 7:10 PM
  • Hello Amar,
        When I got the message about losing the encryption, I did a copy and paste between two XP machines on the same network. I am using an Access 2000 database that is password protected and encrypted.

    The error I received was the following...

    The file 'specs.mdb' cannot be copied or moved without losing its encryption.

    You can choose to ignore this error and continue, or cancel.

      I am not sure any of this matters but I have the latest version of MDAC and Office Pro 2000 installed on both machines and using a Cisco router. If you would like any other information please let me know. I just tried this again and it gave the same message. When it gets to the other machine the database is decrypted.

      I also just tried to install my application onto a laptop and everything installed good except on my developer machine the encrypted database file name is green. When it is installed on the laptop the file name is black in color. When I encrypt the database on the laptop the filename turns to green again.

    Friday, June 26, 2009 1:56 AM
  • Thank you for the Access link Sheng.

    Friday, June 26, 2009 1:59 AM
  • Hello StevenC1976

    I had got your problem wrong! I thought you only encrypted using the password in Access.

    Now that I understood you are using file encryption, here is what we can do:

    - When using file encryption on a computer, the file is actually encrypted using the certificates you have on that computer.
      So, yes, when we try to copy that file to another computer, we lose the encryption on it.

    - However, you mentioned that you wanted to use encryption on your file when you install it somewhere.
      We can do so by calling a small program that makes use of the function File.Encrypt() in the System.IO class.
      Once you have installed your app and copied the access mdb file, just call File.Encrypt("<FilePath of mdb>") and your access file will be encrypted.
      In case you want to decrypt the file later, you can use the File.Decrypt("<FilePath of mdb>") function.

    Hope this helps!


    Have a great day!
    Amar
    • Marked as answer by StevenC1976 Tuesday, July 7, 2009 1:11 AM
    Wednesday, July 1, 2009 9:31 AM
  • Amar...thank you for the information. I did as you suggested and everything worked well.



    Tuesday, July 7, 2009 1:11 AM