Friday, March 2, 2012

SQL Server Compact 4.0 SP1 CTP1 available

(Nice short name!) SQL Server Compact 4.0 SP1 CTP1 is now available for download: http://www.microsoft.com/download/en/details.aspx?id=29037 – is is also installed with Visual Studio 11 Ultimate beta. Installing this .MSI will replace your current SQL Server Compact 4.0 binaries in Program Files, and change the version to 4.0.8854.1.

No blog post or KB article yet, I will update this post when they become available. I the meantime, I have skimmed though the code in the ADO.NET provider, which reveals the following changes (all is just guesses, and it is beta software, of course):

New connection string keyword: “File Access Retry Timeout” – will reattempt connection open from 0 – 30 seconds, with a default value of 0.

Improved local C++ runtime verification.

SqlCeConnection.GetSchema bug fixes

SqlCeParameter.Add(String parameterName, Object value) has been deprecated.  Use AddWithValue(String parameterName, Object value) instead.

According to this thread, this bug has been fixed: Getting exception "The data area passed to a system call is too small." in SQL Server Compact 4

10 comments:

二百五 said...

Hi ErikEJ,

The problem I encountered is that I used your toolbox export CE4 DB (data and schema) to files, but I found nowhere to import to,say, another CE4 DB.
For CE3.5, SQL 08 R2 SSMS can execute each generated file, (13 files, size around 240MB), into another CE4 DB (that's what I could think of for importing), the execution is pretty fast.
I read your blog and knew that MS SQL 08 R2 SSMS doesn't support CE4.0. And I used your toolbox to execute those files, much slower than SSMS. Any idea?

Thanks!

二百五 said...

Hi ErikEJ,

The problem I encountered is that I used your toolbox export CE4 DB (data and schema) to files, but I found nowhere to import to,say, another CE4 DB.
For CE3.5, SQL 08 R2 SSMS can execute each generated file, (13 files, size around 240MB), into another CE4 DB (that's what I could think of for importing), the execution is pretty fast.
I read your blog and knew that MS SQL 08 R2 SSMS doesn't support CE4.0. And I used your toolbox to execute those files, much slower than SSMS. Any idea?

Thanks!

ErikEJ said...

You can use my command line query utility: sqlcecmd40.exe, available from http://sqlcecmd.codeplex.com

Roark said...

I'm getting this error when trying to add a controller with an EF template. I've started with a new project and installed the packages. I've tried uninstalling/reinstalling SQL Server Compact 4.0 SP1 CTP1. The app runs and uses the 4.0 membership database ok. I can also use the Sql Compact Toolkit.

Exception Type: System.Data.SqlServerCe.SqlCeException
Exception Message: Native components of SQL Server Compact engine are not loaded. Please reinstall Microsoft SQL Server Compact.
Exception Stack Trace: at System.Data.SqlServerCe.NativeMethods.ThrowIfNativeLibraryNotLoaded()
at System.Data.SqlServerCe.SqlCeConnection.Dispose(Boolean disposing)
at System.Data.SqlServerCe.SqlCeConnection.Finalize()


-------------------------

Installed Extensions
DevExpress Tools
State = Enabled
Version = 10.2.5

NuGet Package Manager
State = Enabled
Version = 1.6.21215.9133

WoVS Default Browser Switcher
State = Enabled
Version = 0.8.9

VSCommands 2010
State = Enabled
Version = 3.8.0.6

SQL Server Compact Toolbox
State = Enabled
Version = 2.6.2.1

Crypto Obfuscator Add-in
State = Enabled
Version = 3.0

Entity Framework Power Tools CTP1
State = Enabled
Version = 0.5.0.0

Productivity Power Tools
State = Enabled
Version = 10.0.20626.18

WPF About Box (VB)
State = Enabled
Version = 0.5

Indent Guides
State = Enabled
Version = 11.0



-------------------------

Environment Data
VisualStudio.Version = 10.0
VisualStudio.Edition = Ultimate
VisualStudio.FullName = C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
VisualStudio.RegistryRoot = Software\Microsoft\VisualStudio\10.0
VisualStudio.LocaleId = 1033
VisualStudio.DisplayMode = vsDisplayMDITabs
Time.UTC = 3/7/2012 3:05:00 PM
Time.Local = 3/7/2012 7:05:00 AM
OS.Architecture = AMD64
Environment.Version = 4.0.30319.17379
Environment.HasShutdownStarted = False
Environment.OSVersion.Platform = Win32NT
Environment.OSVersion = 6.1.7601.65536
CurrentThread.Id = 1
CurrentThread.Name = [null]
CurrentThread.ThreadState = Background, WaitSleepJoin
CurrentThread.IsBackground = True
CurrentThread.UICulture = English (United States)
CurrentThread.Culture = English (United States)
Process.PagedMemorySizeMB = 349.40234375
Process.MaxWorkingSetMB = 1.34765625
Process.NonpagedSystemMemorySizeMB = 0.218002319335938
Process.PagedSystemMemorySizeMB = 1.37675476074219
Process.PrivateMemorySizeMB = 349.40234375
Process.VirtualMemorySizeMB = 985.390625
Process.WorkingSetMB = 441.21484375
Process.UpTime = 00:01:15.7154308

ErikEJ said...

Suggest you ask on Stackoverflow or MSDN, and please provide more information, like type of project, your config file settings etc.

Felipe Fujiy Pessoto said...

The nuget package don´t work at Medium Trust! You need to rollback the version to 4.0.0.0.

ErikEJ said...

Felipe - what errors are you getting...

John W. S. Marvin said...

Is this the same Medium Trust problem that required us to copy System.Data.SqlServerCe.dll from the 4.0 Desktop folder rather than using NuGet? I was hoping that would be solved.

jamome said...

Hi Erik,

First, thanks for your blog and toolbox - you're providing much more dev support on SQLCE than Microsoft!!

I have two questions:
1) Do you know of the release ETA of SQLCE4.0 SP1 (when it comes out of beta?)
2) I am using C++/MFC - Does CompactDatabase work differently in 4.0? It worked find in 3.5, but since moving my code to 4.0 I cannot get that call to work (and ISSCEError get_Description returns an empty string).

Thanks again,
Jared

ErikEJ said...

Jamome: 1: 15th august 2012, released with VS 2012, 2: Not a clue, I do mainly .NET Dev, no C++