Compact Framework / Sql CE support
Since v1.0.2005.1, LLBLGen Pro supports the Microsoft Compact Framework.NET (CF.NET) and SqlServer CE on PocketPC and Windows CE. This section discusses
the limitations of the support LLBLGen Pro currently offers for CF.NET. LLBLGen Pro supports the CF.NET 1.0 framework and CF.NET 2.0 framework as well as
SqlServer CE 2.0 or higher and also SqlServer CE Desktop v3.1 on .NET 2.0 or higher. CF.NET 1.0 development requires Visual Studio.NET 2003, CF.NET 2.0 development requires Visual Studio.NET 2005, CF.NET 3.5 development requires Visual Studio.NET 2008.
This section is about SqlServer CE support for the compact framework. Please see Database specific features
for details about SqlServer CE Desktop.
- LLBLGen Pro v2.6
- For CF.NET 1.0, OpenNETCF installed (v1.4: http://www.opennetcf.org)
- For CF.NET 2.0, you need CF.NET 2.0 SP2 as well.
- CF.NET v1.0, v2.0, v3.5
- Pocket PC / Windows Mobile
- C# and VB.NET
- SelfServicing and Adapter. Adapter is recommended and a developer should set KeepConnectionOpen to true.
- SqlServer CE v3.0 or higher. You can use SqlServer CE 2.0 but it's highly recommended you use the latest SqlServer CE database version.
- SqlServer projects only, when it comes to data-access. You are able to generate DatabaseGeneric code in adapter projects for other
Compiling your code / using the code
VS.NET projects are generated automatically. Please select the required CF.NET version in the platform combo box in the
generator configuration dialog
The Runtime libraries are:
For CF.NET 1.0:
For CF.NET 2.0:
For CF.NET 3.5:
You have to re-generate your code if you have an existing project, you can't recompile your existing code for CF.NET automatically.
To start with SqlServerCE, first create the project on a normal SqlServer 7/2000/2005 database, then generate code using that project and
by selecting CF.NET 1.0, CF.NET 2.0 or CF.NET 3.5 in the platform combo box.
LLBLGen Pro functionality not available
- Remoting, serialization to/from SOAP/Binary formatter
- COM+, enterprise services functionality.
- Design time databinding
- Stored procedure calls
- Delegate support for stored procedure calls in unit of work
- DELETE FROM FROM, UPDATE ... FROM ...
- The generated queries can target only one catalog. The catalogs can have just one schema, so objects in the SqlserverCE
database are targeted as if there is just one catalog and no other schema.
- Schema and catalog name overwriting is not supported: you can specify it, but it's not used.
- Saving a transaction to a savepoint is not supported.
- Named transactions are not supported, the name is ignored
- aggregatefunction(DISTINCT ..) versions are not supported, just the non distinct versions
- STDEV and VAR aggregate functions
- ARITHABORT isn't supported, as SqlServerCE doesn't support indexed views.
- SqlServer type SmallMoney is converted to Money in parameters.
- SqlServer type Char is converted to NChar in parameters.
- SqlServer type VarChar is converted to NVarChar in parameters.
- SqlServer type Text is converted to NText in parameters.
- App.Config reading. Users should supply the connection string to either the Adapter constructor or to DbUtils.ActualConnectionString.
- Type converters
Notes for this release
- For CF.NET 1.0, be sure to reference OpenCFNet 1.4 or higher to be able to compile the generated code.
- Conditional areas are added, to exclude code for CF builds. CF builds use a compiler directive, CF,
which will exclude some areas or include some areas in the code for CF builds only.
- Adapter is recommended, as adapter offers the ability to keep open the connection and SqlServer CE doesn't allow multiple
connections. SelfServicing will open/close the connection multiple times in a hierarchical fetch and is therefore less efficient.
- Multi-threaded applications which execute queries in parallel are not supported, only with a shared adapter object,
which has to be used with care (i.e. has to be surrounded with a lock statement.
- As there is just one catalog supported per project, the catalog to connect to is determined by the connection string.
This means that the catalog specified in the connection string is also the catalog the code will access.