C# and remote database connection (using Compact)
-
28-09-2019 - |
문제
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 !
해결책
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);
다른 팁
You might be able to use the ASE ADO.NET Data Provider. I believe it does work with the Compact Framework.
Just curious; doesn't Connecting to an ASA database on Windows CE documentation provide guidance for doing this on Windows CE?