SQL Compact Edition
From SkobbaPedia
Contents |
[edit] Not Supported
SQL Server Compact Edition does not support:
- Views
- Triggers
- Stored Procedures
Some forms of subquery in SQL CE/SQL Mobile is not supported, like:
select (select from) as from
You can use IN and HAVING and JOINs to accomplish this.
Also SQL CE does not allow for command batching. Which means it must be two separate commands, can’t do "INSERT <Whatever>; SELECT <Whatever>".
[edit] Tools
- SQLToSQLCompactCopy Image:SQLToSQLCompactCopy.zip
[edit] SQL Server Compact Edition Server Tools
To install SQL Server Compact Edition Server Tools, run the following installation program:
C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlce30setupen.msi
[edit] Server Tools
C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlce30setupen.msi
An introduction to SQL Server 2005 Compact Edition [1]
[edit] Replication
Merge Replication or RDA which require that the desktop computer be running IIS & SQL Server.
[edit] .NET Connection
try
{
string DBFILE = "\\Program Files\\MobileCe\\DBbCe1.sdf";
string conString = "Data Source =" + DBFILE + "; password=password";
SqlCeEngine theEngine = new SqlCeEngine(conString);
IF (!System.IO.File.EXISTS(DBFILE))
{
theEngine.CreateDatabase();
}
SqlCeConnection CeCon = new SqlCeConnection(conString);
SqlCeDataAdapter CeAdapter = new SqlCeDataAdapter("SELECT * FROM tblCeEmp", CeCon);
DataSet ds = new DataSet();
CeAdapter.Fill(ds);
dataGrid1.DataSource = ds.TABLES[0];
}
catch (Exception ex)
{
string ee = ex.Message;
MessageBox.SHOW("Error in Binding", "Result", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
}
