R. Martinho Fernandes
R. Martinho Fernandes

Reputation: 234654

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

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?

Upvotes: 1

Views: 710

Answers (1)

ctacke
ctacke

Reputation: 67198

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.

Upvotes: 2

Related Questions