You can only encrypt the entire database file, by setting a password on the connection string used with the database:
Password-or-Pwd-or-database password-or-ssceatabase password
The database password, which can be up to 40 characters in length. If not specified, the default value is no password. This property is required if you enable encryption on the database. If you specify a password, encryption is automatically enabled on the database.
Encrypt-or-encrypt database -or-ssce: encrypt database
A Boolean value that determines whether or not the database is encrypted. Must be set to true to enable encryption or false for no encryption. If not specified, the default value is false. If you enable encryption, you must also specify a password with the password property. If you specify a password, encryption is enabled regardless of how you set this property.
See this topic for a code sample on how to create a encrypted database:
http://msdn2.microsoft.com/en-us/library/system.data.sqlserverce.sqlceengine.aspx
|||Thanks for the reply. So it is not possible to encrypt data on a column only basis. It must be the full database. Is this just the case for Compact Edition?|||This is just the case for CE...|||Thankyou for the help. Im going to have to look into another solution, perhaps Oracle Lite. Cheers!|||Oracle Lite only offers the ability to encrypt the entire database file as well.
There is nothing stopping you from doing the encryption in code.
No comments:
Post a Comment