SQL Server CE 4.0 Deployment Issue - Which Files Are Required?

I am trying to deploy a small Windows Form application that uses a SQL Server CE 4.0 database. I do not want every system working with this application to have to install SQL Server CE 4.0, so I am trying to get any necessary DLL files included in the application.

When I check the list of links, the only link for SQL Server CE 4.0 is System.Data.SqlServerCe . Including the DLL for this, System.Data.SqlServerCe.dll , still produces the following error when trying to connect to the database:

Unable to load native SQL Server Compact components that match the ADO.NET provider 8876. Install the correct version of SQL Server Compact. See Article KB 974247 for more information.

I saw several articles telling about this for different versions of SQL Server CE, but they listed DLLs for other versions, as far as I could tell. The systems on which the application will run must have at least Windows 7 with .NET 4.0 installed, if that matters.

I tried the steps located here to add the files as shown in the link: http://erikej.blogspot.com/2011/02/using-sql-server-compact-40-with.html

With these files included in the assembly, the program compiles without any errors, but when launched in the secondary system, the graphical interface never appears (part of open Form1 () includes a method that captures data from the SQL CE database) and the program simply closes through a couple of seconds. Event Viewer shows this error:

Application name error: Assistant.exe dispatcher overview, version: 1.0.0.0, time stamp: 0x50915d3c Invalid module name: KERNELBASE.dll, version: 6.1.7601.17932, time stamp: 0x503285c2 Exception code: 0xe0434352 Error offset: 0x000000000000caed Failure process identifier: 0x1028 Startup failure time: 0x01cdb78c10761c73 Application path error: C: \ Users \ deLucain \ Desktop \ Release \ Dispatch Review Assistant.exe Module path error: C: \ Windows \ system32 \ KERNELBASE.dll Report ID: 4e4f45e3-237f- 11e2-bd76-14dae92102de

+6
source share
1 answer

We got the same error message when performing a private deployment (i.e. including libraries in the application folder) of the SQLCE 4.0 application.

When adding links to our project, we added the x64 and x86 folders (and the corresponding DLLs) in accordance with the documentation.

At this point, we received an error message:

Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8876. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.

In our environment, we found that the amd64 folder was found under:

% Program Files% \ Microsoft SQL Server Compact Edition \ v4.0 \ Private

also necessary.

After adding it to the project and linking to the dll libraries it contained, our problem was resolved.

+3
source

All Articles