Connection String – Database Creation-time Only Options


In this article, we will discuss the Connection String Parameters that are meant for use only for database creation and not for connection open to an existing database.


Locale Identifier – LCID tells the engine in which locale/collation the database should be created. 

Encrypt – As the name suggest is to encrypt a database.  It is to tell engine to create an encrypted database.  This is going to be deprecated from v3.5 onwards.  Please use Encryption Mode instead.

Encryption Mode – This is a new connection string parameter for v3.5.    It has three values: Platform Default (DEFAULT), Engine Default, and PPC 2003 Compatibility.  This option tells the engine to create a database of platform compatibility to support for the encryption.   Platform Default means try Engine Default if possible, otherwise go with PPC 2003 Compatibility.  Engine Default tells the engine to use the algorithms that may NOT be compatible across all platforms (Which means a DB created on Windows CE 5.0 platform cannot be opened on Windows CE 4.2 platform), on the other side PPC 2003 Compatibility tells the engine to use algorithms such a way that DB file created on Window CE 5.0 platform can be opened on any SQL CE supported platform.


Note that these connection string creation-time only options are used while compacting a database too, as in case of compact also we create a fresh destination database and may over write the source database depending on the options chosen for compact.



Laxmi Narsimha Rao ORUGANTI

Comments (3)

  1. says:

    I am preparing an Windows Client desktop application for the ISV platform test. One of the test requirements is that it needs to allow user switching on XP, which performs flawlessly between users with admin priveleges. It also needs to run as a limited user on XP. I cannot get the application to see the sdf file that I deploy with the msi install file. I have spent a couple of days searching for a solution and have not been able to open the file. I have deployed SSCE as a part of the msi install on the client by copying the 7 SSCE dll’s. All works fine on XP users with admin permissions, but I cannot get a limited XP user to open the sdf file.

    I have worked with Sql Express before and have used the user instance before with limited users, is there anything like that for SSCE?

  2. andyfisher says:

    How do i use this encryption mode option in the connectionstring? I cant find anything else on it apart in the upgrade database util.  I’m after creating a database which i can use on a PPC 2003 device.


  3. olnrao says:

    Hey andyfier,

       Please try this:

       string ConnStr = @"Data Source=myppcdb.sdf; Encryption Mode=PPC 2003 Compatibility";



Skip to main content