Connecting to DB2 via .NET DbConnection(通过 .NET DbConnection 连接到 DB2)
问题描述
我们当前的数据库连接提供程序模型依赖于数据库连接来使用基于 DbConnection (System.Data) 的对象.
Our current DB Connection provider model relies on database connectivity to use DbConnection (System.Data) based objects.
我们可以通过 OdbcConnection 连接到 DB2 (*Nix * Windows),但我们希望允许使用本地 DB2 驱动程序.
We can connect to DB2 (*Nix * Windows) via OdbcConnection, but we would like to allow the use of native DB2 Drivers.
在不脱离我们当前的 DAL 模型的情况下,是否有任何方法(.Net 框架、开源或(最后选择)供应商)?
Is there any way to do so (either .Net framework, OpenSource or (last choice) vendor) without breaking away from our current DAL model?
推荐答案
还有一个上篇文章没有提到的方法,那就是使用DbNetData,它简化了数据库的访问,并且能够从 .NET 连接到 DB2.源代码托管在下面的 CodePlex 上:
There is another method not mentioned in the article above, and that is to use DbNetData which simplifies database access and has the ability to connect to DB2 from .NET. The source is hosted on CodePlex below:
DbNetData
这篇关于通过 .NET DbConnection 连接到 DB2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:通过 .NET DbConnection 连接到 DB2


基础教程推荐
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01