How do I use an MS Access database with the Compact Framework?

柔情痞子 提交于 2021-02-08 07:13:20

问题


I am developing a Compact Framework application that needs to manipulate an existing MS Access database. Apparently the CF has no support for Access databases, or even ODBC. How can I do this, without changing the database?


回答1:


The answer, in short, is that you don't. The CF has no ability to attach to an Access database, remote or local.

Now if the database is on a PC, what I'd be inclided to do is create a simple WCF service that provides access (no pun intended) to the database by either exposing methods specific to your data domain (e.g. GetCustomerByID) or generically (e.g. ExecutSQL).

Doing so adds a lot of complexity, though, because now you don't jsut have the app, you have a service and the connectivity pipeline to maintain as well.

If there's any way around it, I'd sure try to get the data in a SQL Compact store.



来源:https://stackoverflow.com/questions/1651755/how-do-i-use-an-ms-access-database-with-the-compact-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!