Error when connecting to AS400 (ISeries)

Posted by Jimmy Engtröm on Stack Overflow See other posts from Stack Overflow or by Jimmy Engtröm
Published on 2010-03-23T10:08:42Z Indexed on 2010/03/23 10:13 UTC
Read the original article Hit count: 1439

Filed under:
|
|

I'm trying to connect to a AS400 server using the .net classes.
I have added a reference to IBM.Data.DB.iSeries and I use the following code:
var conn = new iDB2Connection("DataSource=111.111.111.111;UserID=xxx;Password=xxx; DataCompression=True;");
conn.Open();

But I get the following exceptions
Running 64 bit: "The provider cannot run in 64-bit mode."
Running 32 bit: An unexpected exception occurred. Type: System.DllNotFoundException, Message: Unable to load DLL 'cwbdc.dll': The operating system cannot run . (Exception from HRESULT: 0x800700B6).

I have uninstalled the Client Access and installed it again. The cwbdc.dll does exist in the system32 and syswow64 . I have no problem connecting to the AS400 if I use odbc.

I'm running a 64 bit verion of Windows 7.
Any ideas?

/Jimmy

© Stack Overflow or respective owner

Related posts about as400

Related posts about .NET