• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 33. Complex Security Issues > Encrypting a Database By Using Code

Encrypting a Database By Using Code

Chapter 32 shows how you can encrypt a database by using the user interface. If a database is not encrypted, it is not really secure, because a savvy user can use a disk editor to view the data in the file. If you have distributed your application with the runtime version of Access and you want to give your user the capability to encrypt the database, you must write DAO code to accomplish the encryption process. The code looks like this:

Sub Encrypt(strDBNotEncrypted As String, strDBEncrypted As String)
    DBEngine.CompactDatabase strDBNotEncrypted, strDBEncrypted,_
       dbLangGeneral, dbEncrypt
End Sub


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint