Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# and remote database connection (using Compact)

I'm developing an application on a Windows CE Platform and this application need a connection to a remote database (Sybase ASE). This remote database is on the internal network.

How can I do this?

It seems that ODBC isn't embedded in the Compact Framework...

The only one solution that I found was to develop an UNIX application that executes my SQL code and send it back to my C# application (using Socket...).

Better idea?

Thanks !

like image 863
Arnaud F. Avatar asked Nov 24 '10 20:11

Arnaud F.


1 Answers

If you have access to IIS, you could create a web service and call that from your Windows CE application. This I think would be cleaner than anything you would do with raw sockets.

I don't know this for a fact, but it is very possible that the DataTable instance could be serialized and a lot of the parsing work would be done for you.

Your web method might be something like this:

DataTable ExecuteQuery(string query);
like image 175
Bryan Avatar answered Oct 05 '22 11:10

Bryan