Ozzie135


Can anyone tell me how to find out if a .sdf file is encrypted Im using C# and would like to know if the db that I am trying to open is encrypted. I would then like to attempt to open the db.

Any help would be appreciated!




Re: How to test if a DB is encrypted?

ErikEJ


Attempt to open the database without a password in the connectionstring. If an error occurs, like

25028

SSCE_M_INVALIDPASSWORD

the database is password protected.