Windows 桌面应用程序更好的数据访问组件

发布于 2024-09-04 10:16:40 字数 117 浏览 3 评论 0原文

哪一个是更好的桌面应用程序数据访问组件?为什么?

1.) 对于 MS Access 2007:ADO、OLEDB、DAO

2.) 对于 MSSQL 2005:ADO、OLEDB、DAO

Which one can be the better one data access component for desktop application and why?

1.) For MS Access 2007: ADO, OLEDB, DAO

2.) For MSSQL 2005: ADO, OLEDB, DAO

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

画离情绘悲伤 2024-09-11 10:16:40

至于他回答的访问部分,我不同意汉斯的观点。

如果您使用 Access,那么使用 DAO 或 ADO 会更好。 DAO 是许多人的选择,因为它通常更容易,并且是 MSAccess 的本机数据访问模型。看看使用ADO还是DAO更好Access 2007 中? 进行更彻底的讨论。

As far as the Access part of his answer, I disagree with Hans.

If you are using Access, you'd be much better off using DAO or ADO. DAO is the choice of many as it is usually easier and is the native data access model for MSAccess. Look at Is it better to use ADO or DAO in Access 2007? for a more thorough discussion.

尹雨沫 2024-09-11 10:16:40

DAO 已经过时了,它不支持您列出的引擎。 OLEDB 和 ADO 是互补的,OLEDB 提供 dbase 引擎接口,ADO 是您将在代码中用于对 dbase 接口进行编程的类的一个集合。 .NET 框架中的 ADO.NET。

对于 Access,您将使用 System.Data.OleDb 命名空间中的类,您的连接字符串使用 ACE 提供程序。对于 SQL,您最好使用 System.Data.SqlClient 命名空间中的类。请访问 connectionstrings.com 以获取有关配置连接字符串的帮助。

DAO is hopelessly antiquated, it doesn't support the engines you listed. OLEDB and ADO are complementary, OLEDB provides the dbase engine interface, ADO is a grab bag of the classes you'll use in your code to program the dbase interface. ADO.NET in the .NET framework.

For Access you'd use the classes in the System.Data.OleDb namespace, your connection string uses the ACE provider. For SQL you'd best use the classes in the System.Data.SqlClient namespace. Visit connectionstrings.com for help with configuring the connection strings.

夢归不見 2024-09-11 10:16:40

问问自己:我需要哪些数据访问功能,并据此选择您的层。
MS Access 是基于文件的数据存储,因此如果您有多个用户使用您的应用程序,那么 Access 是一个糟糕的选择。我会避开 MSA 并专注于更新的技术。

MSSQL 更好,因为它具有可扩展性,支持多个并发用户,并且具有备份和报告服务等附加管理工具。 SQL 2005 精简版 允许您在运行时附加数据库时间,非常适合单实例桌面应用程序。

您可能想要查看的第三个 DAC 是 SQLite,也适用于基于文件的解决方案或桌面应用程序。

Ask yourself: What data access features do I need, and choose your layer based on that.
MS Access is file-based data storage, so if you have more than one user using your app then Access is a bad choice. I would steer clear of MSA and focus on newer technologies.

MSSQL is much better, as it is scalable, supports multiple concurrent users, and has additional management tools like backup and reporting services. SQL 2005 Compact Edition allows you to attach the database at run time, great for single instance desktop apps.

A third DAC you might want to look at is SQLite also for file-based solutions or desktop applications.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文