SQL Server Compact and 64bit support

We've started to get a number of request whether SQL Server Compact will support 64bit.  The answer is absolutely YES!  Ok, but when?  We'll, that part we're working on.  Up until recently, we haven't really seen a big need as the number of clients that have 64 bit hardware was fairly minimal at best.  Even those that purchase 64 bit hardware may still load 32 bit operating systems as lots of software isn't 64 bit ready.  Even if it was, it's not clear it would actually run faster.  In some cases it may run slower.  However, that being said, we do know that developers want their products Vista certified, and need 64bit support.  So, similar to the 4gb limit questions, it seems developers just want to know whether it's an if, or a when.  So, hear clearly, it's a when, not an if.

As for the answer, we're very focused on finishing up Visual Studio 2008 (Orcas) as well as SQL Server 2008 (Katmai).  We hope to have some answers on "when" later this summer as we can rank the features and scenarios we're hearing from customers that they want us to add to SQLce and our end to end client offerings.  Because 64bit isn't a feature, but rather another "platform", we don't necessarily need another release to ship SQL Server Compact 3.5 with 64 bit native support, we just need to finish up the work.  So, one option is we ship 64 bit between 3.5 and our next release.

Now, I hope this post won't get twisted into one of those "Microsoft commitments to the 64 bit platform" rants.  With a nimble team, we can easily adjust to our customer needs based on priorities.  It's clear that 64bit is now becoming a higher priority.  In VS 2005, or even SP1, it wasn't clearly a high priority, which is why we've been holding off.

As we have more committed dates, you can be sure we'll let folks know.  As always, it's great to get your feedback on what you think our priorities should be, what scenarios you need support from, and when...


August 30, '07: Additional Comment

While we know developers want and need full native 64bit support, I should point out that SQLce does work in WOW mode on 64bit machines. Unfortunately because it's loaded in-proc with your app, it does mean the app must be run in WOW mode.  As we ship the native version, you'll be able to simply update the SQLce install, and pop back out of WOW mode to run fully native.

August '08 Update:

64bit support has been released with SQL Server Compact SP1: SQL Server Compact 3.5 SP1 Released

Comments (37)
  1. JohnGalt says:

    As long as it will run in WoW on x64 I don’t really care when it comes out because it’s not blocking.

    What is blocking in 4 gig limit…

  2. Keith Miller says:

    Steve – Here’s a vote for 64 bit support. We are looking to migrate hundreds of clients to run some of our new desktop apps in a Citrix/Terminal services farm on Server 2003 64bit. We are having trouble getting CE to run in those hosted systems.

  3. Joseph says:

    As a dev, I run an x64 workstation because of the RAM needs.  However, I cannot do any SQLCE development because I cannot run SQLCE on my box from the VS IDE because it crashes.  Is this an x64 VS issue or is this a total limitation that SQLCE will not run at all on x64 OS?  So far I have had to do all my SQLCE dev on an x86 virtual machine.

  4. Steve Lasker says:

    Hi Joseph,

    VS will always run in 32bit mode, including WOW on x64.  So, this should not have any affect.  Can you confirm you’ve installed VS 2005 SP1, and the SQLce 3.1 runtime and tools releases from http://www.microsoft.com/sql/editions/compact/downloads.mspx 

    You’ll need the embedded engine, VS Tools and of course you can download the updated documentation (BOL)


  5. Joseph says:

    Steve – thanks for getting back to me.  I have checked that I have VS 2005 (Std) with all updates, the SQL CE 3.1 runtime and tools (they all reported already installed but I downloaded them again and did a repair just to be sure).  I am running on Vista Ultimate x64.  Every time I try to run the app, either from the VS IDE or just regularly installed I get:

    System.BadImageFormatException: An attempt was made to load a program with an incorrect format.  (Exception from HRESULT: 0x8007000B)

    at System.Data.SqlServerCe.NativeMethods.DllAddRef()

    at System.Data.SqlServerCe.SqlCeConnection..ctor()

    at ….. (hope you don’t need the whole thing)

    The line number it reports is where it is trying to get data from the SQLCE file.

    Any thoughts on what I might have configured incorrectly here?



  6. Joseph says:

    Steve – I did some more searching and based on another blog post it seems like I have to force the project to compile for x86 and not Any CPU.  Once I tried this the application now runs from the VS IDE just fine.  Cool!  I would appreciate if you could confirm that this is the right solution for developing and running on x64 with SQL CE.



  7. Steve Lasker says:

    That’s great Joseph,

    And, yes, this makes sense.  


  8. Robert says:

    Using 3.1 I can not get the sample apps to run on X64 unless I set them to x86. Once I do that I can not get mixed mode dlls to load.

    Any suggestions?

  9. Steve Lasker says:

    I’m not a 64bit expert yet.  I’m currently on a few weeks break, so I’m not in the office ‘till the end of August.  However, for client computing, I’ve been installing 32bit versions of the OS on my 64bit hardware, so I’m not speaking from personal expertise here.  So, it looks like I need to install my next build of VS using x64 when I get back.

    However, what I do know is that mixed mode dll’s would imply they could be loaded by both 32 and 64.  Since we don’t yet have 64bit versions of SQLce yet available, there’s no way to load SQLce from a 64bit process.  

    So, my question is do you really need 64bit now, or are you just trying to ride the wave of what every computing hardware will be available?  As noted, we will have native 64bit available, but it won’t be this year.  So, if you could wait, my best suggestion is to run in WOW mode.  I haven’t seen too many client apps really take advantage of 64bit yet.  By the time it becomes prevalent, you can be sure we’ll be there.


  10. robert says:

    Thanks for the reply.

    By mixed mode I mean managed and unmanaged.

    Because they are mixed you need to build them x86 or x64 there is no analagous AnyCPU.

    Do we need 64 bit support? We have customers trying to run our app on a 64bit OS. Yes I know we will get no benefit since we will be thunking down to 32 but we need at least run on the OS. Thus I am trying to get WOW mode working but like I said when I have a project that is 100% managed all works great. When I add one cpp assembly that needs the /Clr:oldsyntax it will not load that assembly and then the application will not run.

  11. Steve Lasker says:

    So, you don’t really need native 64, you just need to run on a 64bit OS.  But, SQLce is holding you back as everything else is working fine.  While there are many advantages to using an in-proc component, this is one of the downsides.  Any component that won’t run in native 64 will drag down the rest of the app.  

    I assume you’re using C++ because you have need for other things in C++, not just because of SQLce.  Just confirming you know we have full managed support for SQLce.  The underlying SQLce engine is native which is what’s holding you back.  Sounds like if you can get WOW mode working, that should buy you the time ‘till we get native 64bit working…


  12. Brian C. Barnes says:

    It looks like the Sql Server Compact 3.5 server tools may not work on 64bit yet? Is that part of the 64bit support you are saying is not in yet, or am I configuring something wrong. The error I get is that it says that IIS isn’t available, or IIS7 is installed but without the backward compatibility bits. I have all of IIS7 installed, including the IIS6 bits. This is on Vista 64.


  13. Steve Lasker says:

    Hi Brian

    Yes, that’s correct, the Server Tools are also part of our 64bit support. As all the tools need to instance the SQLce engine, they all have the same 64bit constraint.


  14. Parag Dave says:

    Hi Steve,

    I am trying some samples from Microsoft Sync Framework for syncing the SQLServer CE database with the SQL Server2005 database, I am getting some version mismatch issue, below is the error messge ,

    System.MethodAccessException was unhandled

     Message="System.Data.SqlServerCe.NativeMethods.CreateErrorInstance(IntPtr ByRef)"


    I guess there is some issue with the Microsoft.Synchronization.Data.SqlServerCe namespace provided with the Sync framework, could you pleas throw some light on this.


    Parag Dave

  15. Steve Lasker says:

    Hi Parag,

    We’re in the middle of posting the bits directly to the web.  Of course, you can get SQLce 3.5 with Visual Studio 2008, but for those working with  VS 2005, that’s a big download just to get our tiny runtime.  Here’s the download link to the English runtime version:

    Desktop Runtime

    Device Runtime:

    Our public website should be live in a week or so.


  16. Agy says:

    Unfortunatelly even the new Sql Server Compact 3.5 doesn’t contain x64 support. Do you know more specific about the ‘When’? Do you plan some CTP soon?

  17. Steve Lasker says:

    We’re actively working on it, and plan to ship it this comming summer with our SP1 that ships with VS 2008 SP1 and SQL Server 2008.  Note: we won’t actually ship "in" VS SP1 or SQL 2008, but rather at the same time as a web download.

    We’ll likely have a public beta, but don’t have a date set just yet.

    We haven’t forgotten… <g>


  18. Charles says:

    When you say "Yes, that’s correct, the Server Tools are also part of our 64bit support." does that mean it currently works on Vista x64 or not?

    I get the same error as Brian regarding IIS needing backward compatibility support, which is already installed.

  19. Steve Lasker says:

    Hi Charles,

    No, at this point we do not have any native 64bit releases available, beta or RTM, client or serfer.  They’re coming though.  I was poking around with some builds just today.  

    I’m sorry to say we won’t have IIS7 native support in this comming SP1 release.  You can still use IIS6 Compat mode.


  20. A while back I posted some info about our intention to ship a native 64bit release: SQL Server Compact

  21. Leon says:

    Hey Steve,

    I have an application which needs to be ran on x64..and uses SQLCE…

    do you know when SP1 with x64 support will be coming out…because if its much longer we will have to find another product which supports x64.


  22. Steve Lasker says:

    Hi Leon,

    The official statement for SP1 release is �this summer�.  If you�d like to contact me directly, we can see if we can help you in the shorter term if this doesn�t meet your schedule needs.


  23. James Taylor says:

    Eagerly looking forward to SQL Server Compact Tools 64-Bit support.

  24. Steve Lasker says:

    By tools support, do you mean the replication tools, or the VS Tools?  VS actually runs in WOW mode as it has many COM dependencies that aren’t native 64.  

    We will be shipping the Merge Replication Server Connectivity tools in native 64 as well.


  25. Jae-Il, Han says:

    Now, it’s summer. Can I see the SSCE 64bit soon? 🙂

    I have to make a decision to use JET again or not. I need your help.


  26. John.Davis says:

    Still no date on the sqlce sp1 with x64, supposedly this summer which is now.

  27. Steve Lasker says:

    Hi Jee-Il,

    Yes, 64bit support is definitley coming.  It’s done and just waiting the release of VS 2008 SP1 and SQL Server 2008.  

    I discussed it a bit here: SQL Server Compact 3.5 SP1 Beta available  and here: SQL Server Compact 3.5 64bit coming soon in Sp1…

    Hope that helps,


  28. Steve Lasker says:

    Hi John,

    Since 64bit is "just another build" of our 32bit release, we need to keep all the releases together.  SQL Server 2008 SP1, SQL Server 2008 and SQL Server Compact 3.5 SP1.

    We’re almost there.  When you see VS 2008 SP1 RTM, look for our http://www.Microsoft.com/SQL/Compact landing page, and we’ll have the 64bit download available.


  29. Ron Jacobs says:

    Let’s just say that I’m not a SQL wiz.&#160; I like to use SQL Server Management Studio express when

  30. Peter says:

    I’m running SQL CE from an SQLCLR assembly inside SQL Server 2005 (x86) … and it works fine in 32 bit mode. But now I had to install it on SQL Server 2005 (x64) edition on WS 2003(x64) and nothing works any more.

    We plan to run our software on x64 WS 2003.

    So I think without x64 support there is no go ??

  31. Steve Lasker says:

    Hi Peter,

    Pretty interesting, hosting Compact inside SQL Server.  I’d love to hear more about how you’re using Compact inside SQL Server.  

    For the how, I have to do some checking to get a confirmation, but since SQL CLR is hosted in-proc, yes, you’ll need an equivalent Compact CPU format to match your server.  The good news is the 64bit release is just around the corner.  When SQL Server 2008 and Visual Studio 2008 SP1 release, we’ll have Compact 64bit available as a web download from http://www.Microsoft.com/SQL/Compact.


  32. Carol says:

    Is there any way in VS 2008 to force the project to run in 32 bit?  I’ve seen the property settings in VS 2005 and they don’t seem to be tehre in VS 2008.  I’m trying to learn how to use VS 2008 and .NET 3.5 and without the 64bit Jet engine I’m at a standstill.

  33. Steve Lasker says:

    Hi Carol,

    Yes, you can set the Platform Target = x86 and x64.  You can get to this by double clicking the properties folder in the project (C#) or the My Project in VB. Then select the Build tab.

    In VB, select the Compile tab, then select the [Advanced Compile Options…] in the bottom left of the Compile tab.


  34. Carol says:

    Thanks for your response, but I can not find the compile options (I’m using VB).  The property pages only have the following options:  References, Build, Accessibility, Start Options, MSBuild Options.  None of those options have a button for advanced compile options and none of them have any way (that I can see) to set the platform target.

  35. Steve Lasker says:

    Hi Carol,

    I’ve check the VB profile to make sure these options are still visible in VB.NET  which they are, so can you try reviewing this help topic to see if it helps:



  36. Carol says:

    Thanks – I found it.  Problem is, the advanced compile options are not available in a website and I had a website that was attached to an access database.  I just modified my program to use SQL instead of Access and got it working.

  37. Steve Lasker says:

    Great to hear Carol.  I was creating WPF projects, and forgot the differences between web projects.  

    For websites, you might try adding a dll project, then referencing the dll from your web project.  This would give you the full features of the VS project system.


Comments are closed.

Skip to main content