如何在Compact Framework中使用MS Access数据库? [英] How do I use an MS Access database with the Compact Framework?

查看:56
本文介绍了如何在Compact Framework中使用MS Access数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Compact Framework应用程序,该应用程序需要处理现有的MS Access数据库.显然,CF不支持Access数据库,甚至不支持ODBC.如何在不更改数据库的情况下做到这一点?

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?

推荐答案

简而言之,答案是您没有.CF无法附加到远程或本地Access数据库.

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

现在如果数据库位于PC上,我想做的就是创建一个简单的WCF服务,该服务可以通过公开针对特定对象的方法来提供对数据库的访问(无双关)您的数据域(例如GetCustomerByID)或常规数据(例如ExecutSQL).

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.

如果有任何解决方法,我肯定会尝试在SQL Compact存储中获取数据.

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

这篇关于如何在Compact Framework中使用MS Access数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆