Friday, November 5, 2010

SQL Server Compact 4.0 CTP2 released

Together with WebMatrix beta 2, SQL Server Compact CTP2 has been released. The build number for this release is: 4.0.8435.1.

(CTP1 build number was: 4.0.8402.1)

Direct download link is:

x64 runtime: http://go.microsoft.com/fwlink/?LinkID=202429 (includes x86 runtime for x64 systems)

x86 runtime: http://go.microsoft.com/fwlink/?LinkID=202428

There is no updated documentation with this release, but a couple of bugs reported by me have been fixed:

Inability to upgrade in-place - http://social.msdn.microsoft.com/Forums/en-IE/sqlce/thread/872e49da-1d3e-457a-9288-c1e1f0c90dc8

Get SqlCeReplication.SubscriberConnectionsString returns an invalid connections string - http://connect.microsoft.com/SQLServer/feedback/details/589806/sql-server-compact-4-replication-library-bug-w-subscriberconenctionstring

Update: CTP2 causes some issues with EF Feature CTP4 (and MVC 3 beta), if you are using |DataDirectory| macro in your connection string:
http://social.msdn.microsoft.com/Forums/en/adonetefx/thread/808df2cc-1177-47d9-b333-304701520cc8

16 comments:

Mike Borozdin said...

Any changes in comparison to CTP 1?

By the way, seems like you're the first one to have blogged about it. Even the official team blog keeps silence.

ErikEJ said...

Mike: I don't think there are any changes apart from some bug fixes.

Sparrow said...

Your link is 64bit, 32bit ?

Is this 32bit ?

http://go.microsoft.com/fwlink/?LinkID=202428

(one less than yours ;-)

ErikEJ said...

Sparrow: Thanks, that's it - I have updated the post!

BERTHOLD EDMUND said...

Hi , sqlmetal doesnt seem to work with v4 , any suggestions ? 'im new to .net

ErikEJ said...

Berthold: Linq to SQL is no longer supported with verson 4. You must use Entity Framework 4.0 instead (and this will not work with designers until VS 2010 SP1 comes)

Unknown said...

Hi Erik!

I'm having trouble trying to get v4.0 CTP2 working on my system. I have:

x64 XP SP3
VS2010
Web-forms project using EF4

Now, I've removed v3.5 and installed v4.0 CTP2 and trying to use the "server tools" from within VS. No go! Furthermore I try to update my EF-model from within VS. Again no go (unable to create a SSC v4 connection)! What are the necessary steps to perform in order to have a working v4.0/VS2010 integration?

Many many thanks in advance!
/Peter

ErikEJ said...

Peter: You must wait for VS 2010 SP1 for full tools support. I the meantime, you can use this blog post: http://erikej.blogspot.com/2010/11/using-entity-framework-with-sql-server.html (requires 3.5 to be present!)

Unknown said...

Hi Erik!

I tried your suggestion creating a copy of the 3.5 database and upgraded it to 4.0! Furthermore I did the amendments outlined to the web.config and edmx file, but when I try to issue an "Upgrade model from database..." command i get the following error:

"An exception of type 'Microsoft.VSDesigner.Data.Local.ConnectionStringConverterServiceException' occurred while attempting to update from the database. The exception message is: "

Hmmm, not very informative:-(

In web.config I changed "provider=System.Data.SqlServerCe.3.5" to "provider=System.Data.SqlServerCe.4.0"

and in the edmx file I changed "Provider="System.Data.SqlServerCe.3.5" ProviderManifestToken="3.5"" to "Provider="System.Data.SqlServerCe.4.0" ProviderManifestToken="4.0""

Hmmm, I'm beginning to get the "ugly XP x64" feeling here. I mean, I could only install the x64 bit version of the 4.0 CTP2. When trying to install the x86 a received a message that this was a "no go"...

I need a standalone db able to handle a very small database (up to 40 tables maximum and a peak number of records in a specific table to roughly 10000 records) and thought that the Compact engine v4.0 would be a good choice for a small ASP.Net web-forms solution. Do you still think this is a wise choice or should I have a luck at, say, Firebird?

Thanks for your support/suggestions on this Erik!
/Peter

ErikEJ said...

"Upgrade model from Database" will only work for now with a 3.5 database, you must wait for SP1. Compact is the right choice for you!

Unknown said...

Hi Erik and thanks!

One more question then I'll leave you alone:-)
Currently I'm not in dire need for the possibilities offered in v4.0, I'm fine with v3.5. The problem with v3.5, which you're certainly aware of, is that VS will not allow me to deploy a web-forms app while developing, which is, let me say, a bit disappointing. Is there a setting somewhere (registry?) which would allow me to continue to use v3.5 for a while, until v4.0 is launched properly and integrated with VS2010 (provided it's not too far away...)?

Cheers,
/Peter

ErikEJ said...

Peter: Yes, you can modify global.asax, see step 4 in this blog post: http://erikej.blogspot.com/2010/06/walkthrough-expose-sql-compact-data-to.html (I assume this is what you are after?)

Unknown said...

Yep - that did the trick! I'll stick to 3.5 'til the support for 4.0 has matured.

Many thanks Erik!

Cheers,
/Peter

Anonymous said...

Hi Erik,

I am trying to convert my database from version 3.5 to version 4.

I use this script:
c:\DevelopmentResources\DevTools\SQLCompact>SqlCeCmd40.exe -d "Data Source=C:\So
urceCode\TravelAgencyManager\Database\TravelData.sdf" -e upgrade

When I run this command I get help screen and the database keeps unchanged. Do you have an idea what I do wrong?

Thanks, Petr

ErikEJ said...

Make sure the quotes are normal double quotes.

Anonymous said...

Thank you, that was the problem!