This is why it is named "Compact" edition... :) No extra stuff so it has
small footprint and easy to get on both mobile devices and desktops.
When you installed the only item you should have on your Programs menu is
the Books On Line. And you should start there... It has answers to most of
your questions.
Just to get you started:
- If you already have SQL Server Management Studio (or you can download SSMS
Express from here
http://www.microsoft.com/downloads/details.aspx?familyid=6053c6f8-82c8-479c-b25b-9aca13141c9e&displaylang=en),
then on the login screen in SSMS you select "SQL Server Mobile" for Server
type. Then browse to the database file or create a new database.
- To create database programmatically in VB you do something like this:
Dim ConnectionString As String = "Data Source='MyDatabase.sdf'; LCID=1033;
Password="myp@ssw0rd"; Encrypt = TRUE;"
Dim engine As New SqlCeEngine(ConnectionString)
engine.CreateDatabase()
- There is nothing to start, the Compact edition does not run as a service.
It is initiated automatically when you access it programmatically.
- If you use the OLE DB provider (SQLCEOLEDB30.DLL), then no need for .NET
2.0
- If you use the ADO.NET data provider (System.Data.SqlServerCe.dll), then
you need .NET 2.0 (since the ADO.NET provider is using the SQL Server Native
Client)
The Compact edition works great, just have in mind that there are some
limitations (it has been optimized to me small and efficient on various
devices):
- Procedural T-SQL code is not supported (stored procedures, views,
triggers).
- The T- SQL language is limited (for example, no TOP, IF, ROW_NUMBER).
- No distributed transactions support.
- No native XML and XQuery support (XML is stored as NTEXT).
Here are a few great samples and tutorials to get you started with
development:
http://msdn2.microsoft.com/en-us/sql/bb219480.aspx BTW, when I first started with the Compact edition, I found the Compact
edition home site to have plenty of information:
http://www.microsoft.com/sql/editions/compact/default.mspx And if this doesn't fit you can always use the Express edition (of course,
at the expense of the heavy installation, but you get the full
functionality).
HTH,
Plamen Ratchev
http://www.SQLStudio.com