Determine if SDF database is encrypted
Is there开发者_运维问答 any way to determine, before connecting and having an exception thrown, if an SQL Compact Edition SDF has password encryption?
After selecting the file in an Open File Dialog, I want to check if there is a password encrypting the SDF and prompt for the password.
A quick way to determine if any file is either encrypted or compressed is to try and compress it again. Obviously SQLCE does not support compression, so if the SDF cant compress, it is encrypted.
精彩评论