积极答复者
c# 访问 db2数据库 出错

问题
-
使用连接如下:
<add key="DB2ConnectionString"
value="Provider=IBMDADB2;Database=SHJJY;PROTOCOL=TCPIP;hostname=127.0.0.1;uid=db2admin;pwd=db2admin;" />
异常信息如下:
用户代码未处理 System.Data.OleDb.OleDbException
Message=" CLI0104E Unable to connect to data source. SQLSTATE=08001"
Source="IBM OLE DB Provider for DB2 Servers"
ErrorCode=-2147467259
请帮忙指点下。另外,我使用 GetTableSQL.exe 工具连接db2服务端,是可以连接上的。
答案
-
你好,
DB2没有用微软的provider,我想问题应该就在provider,你可以参考:
http://www.codeproject.com/KB/database/DotnetDb2.aspx
http://www.datadirect.com/products/net/net-for-db2/
周末越快~
Alan Chen[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Jackie-SunModerator 2011年3月9日 1:56
全部回复
-
Hi RunningStone,
请您提供一些代码,及callback中的出错信息。将有助于我们更好地解决问题。
谢谢您的理解,
Lucy
Lucy Liu [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
你好,
DB2没有用微软的provider,我想问题应该就在provider,你可以参考:
http://www.codeproject.com/KB/database/DotnetDb2.aspx
http://www.datadirect.com/products/net/net-for-db2/
周末越快~
Alan Chen[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Jackie-SunModerator 2011年3月9日 1:56