sql compact desktop support?

Posts   
 
    
Posts: 27
Joined: 16-Jul-2007
# Posted on: 23-Aug-2007 07:10:04   

i see many references to support for using sql ce in desktop apps but have not been able to make this work. help!

vb.net 2.0 app, .sdf data source.

note:NOT cf app.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 23-Aug-2007 09:51:32   

The following is copied from LLBLGen Pro manual's section "Concepts -> Compact Framework / Sql CE support":

LLBLGen Pro supports the Microsoft Compact Framework.NET (CF.NET) and SqlServer CE on PocketPC and Windows CE.

Posts: 27
Joined: 16-Jul-2007
# Posted on: 23-Aug-2007 10:04:50   

the following is quoted from the front page of llblgen.com (amongst other places)

It's here: LLBLGen Pro v2.5, packed with new features like auditing, authorization, dependency injection mechanism, super fast and compact serialization (XML and binary), Sqlserver CE Desktop support, Sybase support ......

and i did an RTFM search and found some more info. perhaps enough to get started.

anyone else need it just search help file for 'Sqlserver CE Desktop' as I should have done before posting this.

thanks. Sky

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 23-Aug-2007 10:37:01   

Oops flushed my fault. I didn't refer to the latest documentations.

Now back to your question.

i see many references to support for using sql ce in desktop apps but have not been able to make this work. help!

What have you tried? And what were the results?

Did you follow the following steps mentioned in the LLBLGen Pro v.2.5 docs "Using the generated code -> Database specific features":

To be able to target SqlServer CE Desktop, you first has to create a SqlServer project, similar to what you have to do for CF.NET support. Then, you have to follow this list of steps to generate and compile a successful project:

At tab 1 in the Generator Configuration dialog, platform .NET 2.0 or .NET 3.0 has to be chosen. CF.NET 1.0/2.0 or .NET 1.x aren’t supported for SqlServer CE Desktop. At tab 2, the template bindings for SqlServer CE Desktop, SD.TemplateBindings.SqlServerCEDesktopSpecific.NET20 have to be moved above the SqlServer specific template bindings, SD.TemplateBindings.SqlServerSpecific.NET20, so the SqlServer CE Desktop specific templates overrule the ones for SqlServer Code can now be generated normally for adapter or selfservicing. Stored procedures aren’t supported, so if your LLBLGen Pro project contains stored procedure calls, there might be classes being generated for stored procedures but that’s not used in the compiled assembly as it contains a conditional compilation statement: if CEDesktop as a conditional token is defined, the stored procedure call code is excluded. The CEDesktop conditional compilation symbol is also used to create proper System.Data.SqlServerCE targeting code instead of System.Data.SqlClient using code.

When loading the generated VS.NET projects, the references to the SqlServerCE DQE for .NET 2.0 should be checked as well as the reference to the SqlServerCE client dll shipped with the SqlServer CE SDK. If they're not correct, please correct the references. To be able to connect to a SqlServerCE desktop database, one has to adjust the connection string, as this connection string is the one used to connect to the SqlServer catalog from which the LLBLGen Pro project was created. It has to have the format shown by the following example:

<add key="Main.ConnectionString" value="data source=c:\pathtodb\Northwind.sdf;"/> As SqlServer CE Desktop doesn’t support multiple catalogs nor multiple schemas, these features aren’t available. Also COM+/System.Transactions transactions aren’t supported. All other LLBLGen Pro native features, like dependency injection, validation, authorization etc. are supported.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 23-Aug-2007 10:42:58   

It of course requires v2.5 as it was introduced in v2.5

Frans Bouma | Lead developer LLBLGen Pro
Posts: 27
Joined: 16-Jul-2007
# Posted on: 23-Aug-2007 11:19:56   

once again i am caught not RTFMing. The info in the new docs is spot on. I have it working great.

hopefully this post may help someone else who did't RTF new M. ;-)

thanks guys.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 23-Aug-2007 11:33:23   

sky.sanders wrote:

once again i am caught not RTFMing. The info in the new docs is spot on. I have it working great.

hopefully this post may help someone else who did't RTF new M. ;-)

thanks guys.

No problem simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Anthony
User
Posts: 155
Joined: 04-Oct-2006
# Posted on: 16-Jan-2010 02:03:12   

llblgen 2.6

I am trying to setup SQl Compact fort dsktop but do no see under biing the

SD.TemplateBindings.SqlServerCEDesktopSpecific.NET20 item to move it up?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 16-Jan-2010 04:51:31   

Now all you need is configure the compatibility level. Please take a look at the manual info.

P.S. Please don't re-open old threads. Next time create a new one.

David Elizondo | LLBLGen Support Team