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
基础教程推荐
- 将数据集转换为列表 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 如果条件可以为空 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
