SQL Server Compact Edition 3.1 Released

Well, after several name changes, power outages, the holidays, and crippling winter storms, we've released SQL Server Compact Edition 3.1.  http://www.microsoft.com/sql/compact

While not required to use SQLce 3.1, you can get the benefit of the new ClickOnce deployment features with Visual Studio Service Pack 1

This will add the ClickOnce bootstrapper, and |DataDirectory| macro to the connection strings.  It also includes several bug fixes in the data tools for SQLce.

For more info, there's plenty of info here on my blog, including screen casts and samples.  Pay no attention to the multiple names.  The features have remained the same, and like fine wine, the product continues to improve.  

For additional info:

Please help me congratulate the SQL Server Compact Edition product team as they've been extremely busy shipping SQLce 3.1, finishing up SQLce 3.5 for Orcas, completing Vista compat, shipping device and Yukon service packs, and still finding time to work on new investments.  They've been a great team to work with and I'm sure they'd love to hear from you.    

What's next?

Well, as noted, we're finishing up the fist beta for the next release, SQL Server Compact Edition 3.5 and the new Sync Service for ADO.NET.  We've sent out some bits to a few customers and are working on getting the public forums setup for a public CTP.  Between the holidays, the local power outages, the crippling snow storms, and getting everything ready for the first beta of Orcas, everyone has been pretty busy.  If you've asked about the CTP, and didn't receive the bits, don't worry, it's coming.  We could only manage a few customers until the forum gets setup.  There's still plenty of opportunity to get us feedback, so just a bit more time.

Thanks for all the feedback and patience,


Comments (12)

  1. Richard Jones says:

    Nice post.

    Love the product.

    Its made our work as a partner so much easier, with the work you guys put in.

    Have the next snow storm on us 🙂

  2. BestSnowman says:

    I love SSCE, its like a dream come true!

    Are there any plans for an x64 version? I tried deploying a .NET app that used SSCE with the AnyCpu tag on an Vista x64 system… that was fun 🙂

  3. Steve Lasker says:

    Hi BestSnowman

    We definitely plan to support 64bit environments.  Many of the components already work in 64bit, as parts of SQLce ship in Vista.  However, the Vista work was all done before we made the final decision to release the whole stack as SQLce, so we still have some QA work to do in order to fully support 64.  As to when, we were just discussing that yesterday.  We didn’t originally plan to do it for the 3.5 Orcas timed release as it wasn’t thought to be a mainline issue for a while and we prioritized some other work, such as perf in front of it.  Based on the proliferation of new 64bit machines, we may try to pull it into the 3.5 release, but no promises.  But, have no doubts, SQLce is a major part of our future client plans, so we will support 64bit in the future.

    Was that vague enough on when, but concrete on the commitment? <g>


  4. Steve Lasker says:

    Hi Jamome,

    Thanks’ for the reminder.  Let me ask the perf team for the status of the paper.  


  5. BestSnowman says:

    Great answer Steve, kind of the answer I was sort of looking for. I’ll be looking forward to a 64-bit release 🙂

  6. casner says:

    A bit of confusion here – your blog and some pages refer to 3.1 edition.  Yet the sqlce when installed still is named sqlcecompact30.dll, so I’m not sure whether it is 3.0 or 3.1 for Windows CE installation.

  7. Steve Lasker says:

    Hi Casner,

    For SQLce 3.1 we wanted to maintain backwards compat, and leverage all the 2005/3.0 designer and runtime support so we didn’t actually change any of the physical versions.  In reality, the 3.1 release was really about unlocking the device scenarios on the full desktop.  SQLce 3.5, currently in CTP will have the native and managed dlls names changed to support full side by side of 3.x and 3.5.  In hindsight, we probably should have made the 3.5 version 4.0 as it does have new feature work.  


  8. M. Gopalan says:

    Dear Sir,

    We are using SQL Server Compact Edition 3.5 and the front end is Visual Studio 2005 (VB.NET) windows application. We have some questions listed below:

    1. What 3 ways to create a database (if possible give me a sample code)? and tell me the advantage of this 3 way.

    2. We have a database in MsAccess97 its about 450 MB. We converted those datas into SQL Compact Edition 3.1 (.SDF format) it comes to 1.3 GB. Why its taking so much size? If any solution for this it will bge very helpful for us.

    3. We found there is an option in the Provider String called “Encrypt Database=True;”. We have used this option in our project but we don’t find any changes happened in the database.

    4. We are using a SQLCE database (1.3GB) in our application. While querying a table will take a minimum of 1 minute to retrieve the datas even though we did the Indexes for all the tables..

    Awaiting for your response.


    M. Gopalan

    Sofist India

    70, Thyagaraya Rd,

    T. Nagar

    Chennai 600017

    Tamil Nadu, India




  9. Steve Lasker says:

    Hi Gopalan,

    When using SQLce 3.5 with VS 2005, you won’t be able to use the designers as VS 2005 does assume SQLce 3.1.  

    • VS 2005 designers target SQL Server Mobile 3.0 and SQL Server Compact 3.1.  
    • VS 2008 data designers target SQL Server Compact 3.5.

    With that said, you can use the VS products interchangeably with the SQL Server 3.x products in code.  Just reference the accompanying assemblies and use ADO.NET to execute commands.  Here’s a link to the docs explaining the CREATE TABLE syntax: http://msdn2.microsoft.com/en-us/library/ms173393.aspx  To execute these create and other T-SQL commands you can use the following code to execute scripts: Creating your SQL Server Compact Edition database and schema in code

    The database sizes from Jet to SQLce does sound a bit strange.  I can’t remember the Jet to SQLce comparison numbers, but the same schema in SQL Server is typically 1/3 in SQLce.  Is it possible you’re using nChar(x) for string columns, rather than nVarChar(x).  

    Encryption:  If you set a password, encryption is on by default.  If you set encryption, you’ll notice you must provide a password.  Once you open the database, you’re working with the data unencrypted through ADO.NET.  Encryption is at the file level.  If you attempt to open an unencrypted and encrypted file with notepad you’ll see the differences.

    Lastly for performance, as with any database, it’s not about having indexes, but having indexes that serve the queries.  This is where you can use SQL Server Management Studio to test your queries.  Using SQL Server Management Studio you can execute the query with Show Plan to view how SQLce is executing your query.  You’ll likely find the WHERE clause isn’t capable of using the indexes you’ve created.

    Hope that helps,


  10. norpe says:

    Any news on the 64-bit version? Our application cannot be supported on Vista x64 until SQLCE works on 64-bit.

  11. Steve Lasker says:

    Hi Norpe,

    Nothing more specific to report beyond what I’ve posted here just yet:


    I can say that we’re actively working on portions of the 64bit scenarios, but really the team is focused right now on getting VS 2008 done, as well as SQL Server 2008.  As soon as we get that done we can get the 64bit work started.  We’re still confident we can get it done as stated above,

    As for your Vista 64 app, WOW mode won’t buy you the time?

  12. Ganesh Raju says:


    I am trying to use the .sdf file through native c++ in linux system. I would appreciate any suggestions / sample code.


    Ganesh Raju

Skip to main content