简体   繁体   English

从.Net连接到AS400

[英]Connect to AS400 from .Net

I need to connect to an IBM AS400 database from .NET. 我需要从.NET连接到IBM AS400数据库。 There is already a question on this over here: 这里已经存在一个问题:

http://stackoverflow.com/questions/3336646/connect-to-as400-using-net http://stackoverflow.com/questions/3336646/connect-to-as400-using-net

However, that question is old and only fleetingly mentions the IBM i Access Client Solutions. 但是,这个问题很老,只是稍纵即逝地提到IBM i Access Client Solutions。 I do have IBM i Access Client Solutions installed. 我确实安装了IBM i Access Client Solutions。 I cannot find the download for IBM i Access for Windows on their site. 我在他们的网站上找不到IBM i Access for Windows的下载。 I am using the nuget packages for IBM.Data.DB2 and IBM.Data.DB2.iSeries and the code works just fine on my other box where IBM i Access for Windows is installed. 我正在使用IBM.Data.DB2和IBM.Data.DB2.iSeries的nuget包,代码在我安装IBM i Access for Windows的另一个盒子上工作得很好。

When I try and create a connection on this box: 当我尝试在此框中创建连接时:

var connection = new iDB2Connection(connectionString);

I run into an error: 我遇到了一个错误:

Unable to load DLL 'cwbdc.dll': The specified module could not be found. 无法加载DLL'cwbdc.dll':找不到指定的模块。 (Exception from HRESULT: 0x8007007E) (来自HRESULT的异常:0x8007007E)

My question, then, is: What do I need to do to connect when I have IBM i Access Client Solutions installed, but not the (now deprecated according to IBM) IBM i Access for Windows? 我的问题是:当我安装IBM i Access Client Solutions时,我需要做什么才能进行连接,而不是(根据IBM现在弃用)IBM i Access for Windows?

Postscript : I installed a bunch of IBM crap hoping to find something that worked. 后记 :我安装了一堆IBM垃圾,希望找到有用的东西。 For .NET development using IBM.Data.DB2.iSeries, it does not appear necessary to install the IBM i Access Client Solutions Base Package, the IBM data server driver package, or the IBM Database Add-Ins for Visual Studio. 对于使用IBM.Data.DB2.iSeries的.NET开发,似乎没有必要安装IBM i Access Client解决方案基础包,IBM数据服务器驱动程序包或Visual Studio的IBM数据库加载项。 I ended up tracking down the deprecated IBM i Access for Windows. 我最终追踪了已弃用的IBM i Access for Windows。 That got me up and running. 这让我起来了。 I hope to still track down someone with credentials to download the newer IBM i Access Client Solutions - Windows Application Package so I can give it a try. 我希望仍然能够找到有资格的人来下载更新的IBM i Access Client解决方案--Windows应用程序包,以便我可以尝试一下。 ALSO, attempting to gather IBM AS/400 drivers for .NET is a much bigger pain in the ass than I expect it to be in 2018... 此外,尝试收集.NET的IBM AS / 400驱动程序是一个更大的痛苦,比我预期的2018年...

ACS comes in two parts... ACS分为两部分......

universal Java based components, such as the 5250 emulator and database tooling and JDBC drivers. 基于Java的通用组件,例如5250仿真器和数据库工具以及JDBC驱动程序。

Platform specific components, for Windows this include ODBC, ADO and .NET drivers. 适用于Windows的平台特定组件,包括ODBC,ADO和.NET驱动程序。

Sounds like you're missing the Windows components formally known as the IBM i Access Client Solutions - Windows Application Package 听起来你错过了正式称为IBM i Access Client Solutions - Windows应用程序包的Windows组件

Unfortunately, the Windows Application Package must be downloaded from IBM's Entitled Systems Support (ESS) website. 遗憾的是,必须从IBM的Entitled Systems Support(ESS)网站下载Windows应用程序包。

This is the same place your IBM i admins would download OS upgrades or optional components of the OS. 这与IBM i管理员下载操作系统升级或操作系统的可选组件的位置相同。 So they should be able to get you the package you need. 所以他们应该能够得到你需要的包裹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM