连接AS400时出错,无法加载DLL'cwbdc.dll'

时间:2019-05-06 14:39:44

标签: .net ibm-midrange

尝试连接AS 400服务器,但出现以下错误DllNotFoundException:无法加载DLL“ cwbdc.dll”:找不到指定的模块。 (来自HRESULT的异常:0x8007007E。

连接字符串:

<add name="As400" connectionString="Data Source=servername1.servername2.org;Password=myPassword;UserID=myId; pooling=false" />

  public class ConnectionString
    {

        private static string DataString;

        /// <summary>
        /// constructor : sets connection string
        /// </summary>
        static ConnectionString()
        {
            DataString = ConfigurationManager.ConnectionStrings["As400"].ConnectionString;
        }

        /// <summary>
        /// create db connection instance
        /// </summary>
        /// <returns></returns>
        public static iDB2Connection DataSource()
        {
            return new iDB2Connection(DataString);
        }
    }

DataSource方法抛出错误:

IBM.Data.DB2.iSeries.iDB2InvalidConnectionStringException: 'The ConnectionString property is invalid.'
DllNotFoundException: Unable to load DLL 'cwbdc.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

1 个答案:

答案 0 :(得分:0)

您可能必须安装Windows版IBM i Access。

enter image description here