SQLCE Missing method Exception

Posts   
 
    
jspruit
User
Posts: 17
Joined: 11-Nov-2005
# Posted on: 11-Nov-2005 13:46:55   

Hi,

Im testíng a Windows CE + SQLCE application with Windows CE emulator.

Building and deploying works fine, but when i do the following:

FeatureCodeEntity fce = new FeatureCodeEntity();

i get the following message:

An unhandled exception of type 'System.MissingMethodException' occurred in SD.LLBLGen.Pro.ORMSupportClasses.CF11.dll

in:

public FeatureCodeEntity()

InitClassEmpty(new PropertyDescriptorFactory(), CreateEntityFactoryInstance(), CreateValidator());

I'm using "SelfServicing, two class scenario (Full) Vs.Net 2003 CF.NET" with "C# template set for SqlServerCe and CF.NET (Windows CE) (1.0.2005.1)"

All required DLL's are correctly installed in program dir

Anyone knows what it is wrong ?

Regards,

Jan

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 11-Nov-2005 14:27:25   

'System.MissingMethodException', always appears due to version-missmatch.

Most probably one of the dlls you reference in compile time is of different version than the one that was referenced at runtime.

That's why you didn't receive a compilation error.

jspruit
User
Posts: 17
Joined: 11-Nov-2005
# Posted on: 11-Nov-2005 14:55:58   

Hi,

Thanx for your reply.

I forgot to include OpennetCF.

Next error i have is with connectionstring. I manually created following string:

<add key="Main.ConnectionString" value="Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0; data source= \My Documents\BuchenHMI.sdf;"/>

But when running it says

An exception was caught during the execution of an action query: The ConnectionString property has not been initialized.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.

Regards,

Jan

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 11-Nov-2005 15:03:09   

Glad that the first error is solved.

Now to the second one: What do you mean by manually created the connection string? Did you copy it from the generated code config file to your application config file? And did you place it in under <configuration> <appSettings> tag?

jspruit
User
Posts: 17
Joined: 11-Nov-2005
# Posted on: 11-Nov-2005 15:15:13   

Hi,

Generated connectionstring was for SQL server, changed it to SQLCE.

I have two projects in my solution (LLBL generated and Main application). app.config is under main project. Somehow it looks like LLBL generated can't reach connectionstring?

Regards,

Jan

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 11-Nov-2005 15:24:55   

config file reading isn't supported, you have to set the connection string manually in DbUtils. Could you try that please?

note: it seems opencfnet does support config reading but I never got it to work. As debugging on CF.NET is so tedious, I gave up after wasting a lot of time on this, and it's not really important, as you can set the connectionstring directly in the dbutils class.

Frans Bouma | Lead developer LLBLGen Pro
jspruit
User
Posts: 17
Joined: 11-Nov-2005
# Posted on: 11-Nov-2005 15:44:36   

Hi,

Thanx!

added:

DbUtils.ActualConnectionString = "data source= \My Documents\BuchenHMI.sdf;";

This solved the problem.

Regards,

Jan