Error when connecting to AS400 (ISeries)
- by Jimmy Engtröm
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