Compared with MySQL 4.0, SQL Server compact 3.5 is much more advanced and supports Entity Framework 4.1. For lightweight applications, using SQL Server compact 4.0 is a good choice and is easy to deploy.
For the installation package of SQL Server compact 4.0, you only need to publish the relevant DLL and web. config configuration.
In the development environment, you must install
Vs2010 SP1
Microsoft SQL Server compact 4.0
Visual Studio 2010 SP1 tools for SQL Server compact 4.0
You can also useMicrosoft Web platform installer 3.0For installation instructions, see SQL Server compact 4.0 tooling support in Visual Studio 2010 SP1 and Visual Web Developer express 2010 SP1.
Deploy the environment without installing the above tools
1. Copy the following DLLProgramBin directory:
C: \ Program Files \ Microsoft SQL Server compact edition \ v4.0 \ Desktop \ system. Data. sqlserverce. dll
C: \ Program Files \ Microsoft SQL Server compact edition \ v4.0 \ Desktop \ system. Data. sqlserverce. entity \ system. Data. sqlserverce. entity. dll
C: \ Program Files \ Microsoft SQL Server compact edition \ v4.0 \ private \ All files under x86
Note: For a 64-bit deployment environment, all files under c: \ Program Files \ Microsoft SQL Server compact edition \ v4.0 \ private \ amd64 are required.
2. modify web. config or app. config
Add the following nodes:
<Configuration>
<System. Data>
<Dbproviderfactories>
<Remove invariant = "system. Data. sqlserverce.4.0"/>
<Add name = "Microsoft SQL Server compact data provider 4.0" invariant = "system. data. sqlserverce.4.0 "Description = ". NET framework data provider for Microsoft SQL Server compact "type =" system. data. sqlserverce. sqlceproviderfactory, system. data. sqlserverce, version = 4.0.0.0, culture = neutral, publickeytoken = 89845dcd8080cc91 "/>
</Dbproviderfactories>
</System. Data>
</Configuration>
For more information about SQL Server compact 4.0, you can view the new functions of SQL Server compact 4.0.