Adding Structure to a Microsoft SQL Server CE Database

After creating a SQL Server CE database, the next step is to add tables to the database. This can be done graphically by using SQL Server CE Query Analyzer or programmatically by using the SQL Server CE Data Provider classes. To learn more about the Query Analyzer, see Microsoft SQL Server CE Books Online.

To programmatically create database tables, you will need to connect to the database by using the SqlCeConnection class and issue DDL commands by using the SqlCeCommand class. Before we jump into how this is done, we will need to discuss the capabilities of SQL Server CE.

SQL Server CE supports a subset of the DDL. Table 7.2 describes the supported DDL statements.

Table 7.2. DDL Statements ...

Get Microsoft® .NET Compact Framework Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.