Troubleshooting: Privately deploying the SQL Server Compact 3.5 SP2 ADO.NET Entity Framework provider (System.Data.SqlServerCe.Entity.dll) in the application folder does not work

For complete instructions about deploying SQL Server Compact ADO.NET Entity Framework provider (System.Data.SqlServerCe.Entity.dll) privately in the application’s folder refer to the blog here. Note that from SQL Server Compact 3.5 SP2 release onwards if you are privately deploying SQL Server Compact 3.5 SP2 DLLs in your application folder you need to copy the managed DLLs…

1

After moving the database from one platform to other, the first SqlCeConnection.Open() takes more time

    If you move a SQLCE database from one platform to other, it’s first SqlCeConnection.Open() takes more time and also increases the database file size.   The Reason: For an index on string type columns, SQLCE uses LCMapString API to get the normalized sort key. LCMapString API behavior will be different for different NLS sort versions….


Insight into SQL Server Compact database corruptions

Database corruptions are often the most painful bugs to repro and debug. A good percentage of the SQL Server Compact bugs reported are in this category. However it so turns out that in majority of the cases Compact is not the culprit. Surprised!! Let us see why. How SQL Server Compact detects a file corruption? Compact database comprises of a…

3

Query performance

Understanding the reason for slowness of a SQL query and then tuning to boost it is a slightly complicated process, but it can be extremely rewarding in some cases. In this post, I am going to list down some ways in which you can tune the query performance for SQL Server Compact, along with pointers…

2

Can’t find P/Invoke DLL sqlcemeNN.dll

I know this is very annoying, uninformative, directionless…blah blah… error.   And, kindly pardon me for blogging about this error very lately.   Better late than never and here it goes.   What are the actual errors? 1) Can’t find P/Invoke DLL sqlceme30.dll 2) Can’t find P/Invoke DLL sqlceme35.dll 3) Can’t find P/Invoke DLL sqlceme40.dll   What…

19

Troubleshooting: Can’t load sqlce dll

  SQL Server CE/Comapct uses Windows API LoadLibrary (PlatformBuilder or WinCE or Win32) to load the DLLs.   When LoadLibrary fails to load any SQL CE dll, we throw the error “Can’t load sqlce dll”.   Now, let’s discuss more on why LoadLibrary can fail.    1)      Virtual Memory is too low to load the dll 2)  …

4