Cross-platform attempt...

F

Federico Punzo

Hi!
I'm investigating the possibility to make a smart device project work in the desktop too.
This is simple until you start using System.Data and SQLServerCE...

I have restricted and isolated all SQLServerCE references so that no run-time errors will be thrown when running on the desktop.
But I still need to instantiate the OleDB (for example) classes to access the DB in the desktop.
I had no luck trying to get the types or instances of any OleDB classes, since the System.Data.dll that is loaded in the application
is the one from the CF. Even when I attempt to load the full framework assembly, the assembly object that is returned is the one from the CF (v1.0.5000)...

The intention is to run the same .exe on both platforms, and having it decide what classes to use in run-time, so no compile-time conditionals will do.

Can you please throw some light on this subject? It would be great to be able to have the business logic of our applications running from the same
dlls in both platforms, and also to demonstrate our applications without a device...

Thanks a lot,
FP
 
C

C. Vollmer

Federico,

I think it is impossible to have the same exe and dll and access to DB.
You can only try to have a different DLL and to use the IDb...
interfaces and datatypes.
My last solution was to have two different DLLs, one for the PPC and one
for desktop. I had two projects, but with the same source files except
the one for the DB access, in the rest of the data layer I used the
interfaces. It worked for me, but of course you have two different DLLs.

But if you find a solution I would be very interested.

Christoph
 

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