MANAGED CODE REQUIREMENTS
Note that SQL Compact 4 and the new Sync libraries as installed with Visual Studio 2010 do not run on Compact 7 systems. It is highly recommended that you have a development machine specifically for Compact 7 development with only the 2008 version of Visual Studio installed.
A typical Compact 7 SQL Compact application will be developed as Managed Code, although it can be done as a native application. The Managed Code namespace for SQL Compact classes follows:
You can add a reference to this:
Right-click on References in Solution Explorer, choose Add Reference, and select System.Data.SqlServerCe from the .NET tab.
Alternatively you can add a reference to SQL Server Compact in Platform Builder located at:
Right-click on References in the Solution Explorer and choose Add Reference. Select the Browse tab as in Figure 20-6, browse to that directory, and select file system.data.sqlserverce.dll.
A number of classes are in this namespace. They apply only to a SQL Compact database connection, not a SQL server database connection. Table 20-2 shows a list of the main ones.
|SqlCeEngine||For creating new database files.|
|SqlCeConnection||To connect to the database file. It is only a reference to the ...|