Encrypt the Database

You can use ConnectionProfile.EncryptionKey to set the encryption key of a local database. Set the key during application initialization, and before creating or accessing the client database.

ConnectionProfile profile = <PkgName>DB.GetConnectionProfile();
profile.SetEncryptionKey("Your key");
The encryption key must follow the rules applicable to DBKEY in UltraLite:
  • Any leading or trailing spaces in parameter values are ignored.
  • The value cannot include leading single quotes, leading double quotes, or semicolons.