Pocket PC Query

G

Guest

I wrote a application for querying data from server using VS.Net smartdevice application and I run it on the emulator and it work out prefectly fine. However when i install it to my Pocket PC the application can work but when I query from server it thrown an exception "TypeLoadException". I tested out and there is no connection problem. Do I need to install the framework on Pocket PC to make it run? Can anyone help? Thanks alots for your attention.
 
G

Guest

I just cut and paste the .exe file to the Pocket PC will it affect the running of the query?? I try out a simple single statement Sqlconnection sqlCon = new Sqlconnection(); on another application and when i run the application using the emulator it works but when i run it on the Pocket PC it throw the same exception"TypeLoadException". So is it that my Pocket PC needs some dll or something like that? Can anyone help? Thanks

----- angka wrote: ----

I wrote a application for querying data from server using VS.Net smartdevice application and I run it on the emulator and it work out prefectly fine. However when i install it to my Pocket PC the application can work but when I query from server it thrown an exception "TypeLoadException". I tested out and there is no connection problem. Do I need to install the framework on Pocket PC to make it run? Can anyone help? Thanks alots for your attention.
 
P

Peter Foot [MVP]

You do need to ensure the Compact Framework runtime is present on the
device, although this exception indicates that it is already
(TypeLoadException is a managed exception).
TypeLoadException indicates that one of the managed DLLs used by your
application is missing, If you debug it through VS.Net the accompanying
message will tell you which type failed to load and hence which assembly is
missing.
If you are using System.Data.SqlClient, System.Data.Common or
System.Data.SqlServerCe note that these assemblies are not included in the
runtime package and will need to be deployed to the device separately. When
you deploy through visual studio this is done automatically.

Peter
 
G

Guest

Sorry I am student learning smartdevice application. May I know how to include all those assemblies in the runtime package? And how to debug it through VS.Net since when I use the emulator it works out fine. Thanks alot.
 
T

Tristan Leonard

Also, do make sure that the PocketPC is running SP2 of the CF. I have
seen "TypeLoadExceptions" fixed by updating to SP2 very recently, and
I don't think Visual Studio will deploy SP2 by itself.

Tristan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top