Error whie connecting AS400 Unable to load DLL 'cwbdc.dll'

0

Trying to connect AS 400 server but getting following error DllNotFoundException: Unable to load DLL 'cwbdc.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E.

connection string:

<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);
        }
    }

Here DataSource method is throwing error:

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)
.net
ibm-midrange
asked on Stack Overflow May 6, 2019 by Pranav Mishra

1 Answer

0

You may have to install IBM i Access for Windows.

enter image description here

answered on Stack Overflow May 6, 2019 by jia rong

User contributions licensed under CC BY-SA 3.0