How to Encrypt a Microsoft Access Database in Visual BasicLast reviewed: June 21, 1995Article ID: Q104875 |
The information in this article applies to:
- Microsoft Visual Basic programming system for Windows, version 3.0
SUMMARYDatabase encryption has nothing to do with security. However, you can use database encryption to prevent someone from using a file or disk editor to read and write data in a Microsoft Access .MDB file. This article shows by example how to encrypt a Microsoft Access database file in Microsoft Visual Basic version 3.0 for Windows.
MORE INFORMATIONMicrosoft Access reads and writes all data a page at a time. Each page is always 2K in size. Encryption is done at the page level, not at the data level. This means the encryption process has no knowledge of what is on the page, only that there is 2K of data that needs to be encrypted and written. or read and decrypted. Everything in a Microsoft Access .MDB database file is encrypted, including tables, queries, forms, indexes, and so on. Microsoft Access uses the RSA company algorithm for database encryption. The overhead involved in encrypting and decrypting causes is a performance degradation of approximately 10-15% in encrypted databases. Encrypted files cannot be compressed using tools such as PKZip, Stacker, MS-DOS version 6 DoubleSpace, and so on.
Encryption in Visual BasicUse the CompactDatabase statement in Microsoft Visual Basic version 3.0 for Windows to encrypt a Microsoft Access database file. For more information on the CompactDatabase statement, review pages 90-92 in the Visual Basic version 3.0 "Language Reference" manual.
Step-by-Step Encryption Example
|
Additional reference words: 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |