SQLServer CE 3.5 on VS2008

Posts   
 
    
WesGW
User
Posts: 7
Joined: 09-Jan-2008
# Posted on: 09-Jan-2008 23:46:10   

Any support for CE 3.5.0.0 yet?

When attempting to use my generated code with CE, with a reference to System.Data.SqlServerCe.dll ver 3.5

I get:

System.MissingMethodException was unhandled Message="File or assembly name 'System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of its dependencies, was not found."

Using LLBLGen Pro v2.5 final 11/5/07 demo

Thanks,

Wes

fcastell
User
Posts: 13
Joined: 10-Jan-2008
# Posted on: 10-Jan-2008 00:17:11   

Hi,

I use LLBLGen with SQL CE 3.5. You must compile SqlServerCeDQE source code with the reference to System.Data.SqlServerCe.dll 3.5 located on C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices

Fabien

WesGW
User
Posts: 7
Joined: 09-Jan-2008
# Posted on: 10-Jan-2008 00:30:20   

fcastell wrote:

Hi,

I use LLBLGen with SQL CE 3.5. You must compile SqlServerCeDQE source code with the reference to System.Data.SqlServerCe.dll 3.5 located on C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices

Fabien

Thanks. I can't seem to locate the source code to SqlServerCE DQE. I only found the built DLL. Is source not included with the demo version?

fcastell
User
Posts: 13
Joined: 10-Jan-2008
# Posted on: 10-Jan-2008 00:33:58   

I suppose source is not included in demo version. (Check in folder C:\Program Files\Solutions Design\LLBLGen Pro v2.5\RuntimeLibraries\Sourcecode\Net2.x\SqlServerCeDQE)

Fabien

WesGW
User
Posts: 7
Joined: 09-Jan-2008
# Posted on: 10-Jan-2008 00:44:01   

fcastell wrote:

I suppose source is not included in demo version. (Check in folder C:\Program Files\Solutions Design\LLBLGen Pro v2.5\RuntimeLibraries\Sourcecode\Net2.x\SqlServerCeDQE)

Fabien

Thanks, yes, no Sourcecode folder in RuntimeLibraries

I guess I'll have to create a proof of concept with CE 3.1 first, then convince the bosses its worth the investment with the promise that it'll be compatible with 3.5 after we get the source.

Thanks for your help.

fcastell
User
Posts: 13
Joined: 10-Jan-2008
# Posted on: 10-Jan-2008 00:58:49   

you're welcome.

It work with SQL CE 3.5, but sometimes on query with parameters, there is a bug : FormatException : SQL CE try to convert a string parameter to Int32 !!!. I suppose this is because LLBLGen generate SQL Command with ? for parameters. And for SQL CE 3.5 it must use the name of the parameter (@param1).

I test the new solution (convert ? to @param1) and if it work, I would inform Solutions Design and you in this post.

Fabien

fcastell
User
Posts: 13
Joined: 10-Jan-2008
# Posted on: 10-Jan-2008 01:14:04   

Excuse me, I use SQL CE 3.5 on VS2005 not VS2008.

Fabien

WesGW
User
Posts: 7
Joined: 09-Jan-2008
# Posted on: 10-Jan-2008 02:43:20   

Ok, the CE3.0 database is a no-go. It'll have to be 3.5 for device setup reasons.

So, is there any way I could get ahold of the DLL compiled with the reference to CE3.5?

SD Staff: They're reluctant to make the purchase without knowing that official support will be added for CE3.5 in the immediate future. If I can show them that it'll work though, or at least a beta, then I can get it approved.

-Wes

wes.cooper AT glacierwater.com

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 10-Jan-2008 09:39:18   

.NET 3.5 will be officially supported with .NET 3.5 specific code in v2.6. We currently ship .NET 2.0 code which works on .NET 3.5. We hope to have a beta of v2.6 with Linq support (not on mobile) around the end of february.

The issues you ran into are a little odd, as the assembly used for CE connectivity is the one in the compact framework SDK, and this one is the same. Perhaps MS changed the public key in the strong name so the CLR won't load the new one automatically.

Are you referring to CE for mobile or CE for desktop btw?

Frans Bouma | Lead developer LLBLGen Pro
Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 10-Jan-2008 09:50:10   

When attempting to use my generated code with CE, with a reference to System.Data.SqlServerCe.dll ver 3.5

I get:

System.MissingMethodException was unhandled Message="File or assembly name 'System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of its dependencies, was not found."

In your application config file, try to add an assembly redirect to v.3.5 of the System.Data.SqlServerCe.dll

WesGW
User
Posts: 7
Joined: 09-Jan-2008
# Posted on: 10-Jan-2008 22:53:04   

Walaa wrote:

When attempting to use my generated code with CE, with a reference to System.Data.SqlServerCe.dll ver 3.5

I get:

System.MissingMethodException was unhandled Message="File or assembly name 'System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of its dependencies, was not found."

In your application config file, try to add an assembly redirect to v.3.5 of the System.Data.SqlServerCe.dll

Thanks! Assembly redirect worked like a charm!

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Data.SqlServerCe"
                          publicLeyToken="3BE235DF1C8D2AD3" 
                          culture="neutral" />
        <bindingRedirect oldVersion="3.0.3600.0"
                         newVersion="3.5.0.0" />
      </dependentAssembly>
    
    </assemblyBinding>
Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 11-Jan-2008 10:18:35   

Glad it's working. Also for anybody using SQL CE 3.5 the following thread might be helpful: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=12281

WesGW
User
Posts: 7
Joined: 09-Jan-2008
# Posted on: 14-Jan-2008 10:10:44   

Walaa wrote:

Glad it's working. Also for anybody using SQL CE 3.5 the following thread might be helpful: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=12281

Sorry, I lied. It doesn't work. It just makes the problem show up later, when the objects are used (GetMulti()), rather than when created.

Error:

File or assembly name 'System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of its dependencies, was not found.

Stack:

at SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreateSelectDQ()
at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ()
at SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreatePagingSelectDQ()
at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ()
at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.PerformGetMultiAction()
at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.GetMulti()
at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase`1.GetMulti()
at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase`1.GetMulti()
...
WesGW
User
Posts: 7
Joined: 09-Jan-2008
# Posted on: 14-Jan-2008 10:43:07   

Otis wrote:

Are you referring to CE for mobile or CE for desktop btw?

CE for mobile.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 14-Jan-2008 10:47:17   

Then I think fcastell suggestion is the one you should use if you had the source code:

fcastell wrote:

You must compile SqlServerCeDQE source code with the reference to System.Data.SqlServerCe.dll 3.5 located on C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 14-Jan-2008 11:05:29   

Walaa wrote:

Then I think fcastell suggestion is the one you should use if you had the source code:

fcastell wrote:

You must compile SqlServerCeDQE source code with the reference to System.Data.SqlServerCe.dll 3.5 located on C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices

He's using the demo wink (so no sourcecode).

Apparently MS didn't place a redirect for older versions in CF.NET 3.5. Do you get the error on the device or in the emulator? Also I find it very odd that it still fails but now later on in the code. As if the dll is found the first time, but all of a sudden a different appdomain is started, and it can't find the file anymore...

Frans Bouma | Lead developer LLBLGen Pro