How to reference two ORM support classes

Posts   
 
    
asowles
User
Posts: 46
Joined: 23-Apr-2008
# Posted on: 06-Jul-2009 03:44:04   

I have a project that needs to read data out of a SQL Compact Database and then insert it into a Sybase Database. I am using LLBLGen 2.6. My project has to reference both the .NET 2.0 ORM support classes dll and the CF dll at the same time (I get errors if I don't reference them both). When I reference them both, I get an error that RelationPredicateBucket is defined in both .dll's.

How can I use both in the same project? Is this possible?

Thanks,

Allen

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 06-Jul-2009 10:19:04   

Did you try to use the fully qualified name of the RelationPredicateBucket to resolve the ambiguity?

asowles
User
Posts: 46
Joined: 23-Apr-2008
# Posted on: 06-Jul-2009 12:23:53   

Yes I did. Although they are in two separate files, they appear to be in the same namespace so using a fully qualified name doesn't appear to make a difference.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 06-Jul-2009 14:56:25   

In previous versions than 2.6: The CF compiled code is meant to be ran onto the compact framework, so you can't have the situation where you have to reference both, simply because you can't use the CF.NET targeting code on normal .net and vice versa. It was a bit cumbersome, as CE Desktop was using cf.net code.

So, my question is: are you reading from the SQL Server compact desktop database? If so, please use llblgen pro v2.6 as you can use the normal SQLServer DQE and just a compatibility level switch to use CE Desktop specific code instead of normal sqlserver specific code. This then does require just the normal ormsupport classes.

If you are already on v2.6, you shouldn't use the cf.net specific assemblies to read from CE Desktop. If nothing of the above describes your situation, please be more specific and describe why you need compact framework code together with normal .net code.

Frans Bouma | Lead developer LLBLGen Pro
asowles
User
Posts: 46
Joined: 23-Apr-2008
# Posted on: 06-Jul-2009 16:04:00   

Thank you very much for your reply. I am using the SQL Compact Desktop database and I completely missed the compatibility switch. I found it in the help and now I am on the right track. Thank you very much for your help.

Allen