1

I need to connect to an IBM AS400 database from .NET. There is already a question on this over here:

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. I do have IBM i Access Client Solutions installed. I cannot find the download for IBM i Access for Windows on their site. 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.

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. (Exception from 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?

Postscript: I installed a bunch of IBM crap hoping to find something that worked. 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. I ended up tracking down the deprecated 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. 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...

Jereme
  • 1,445
  • 1
  • 16
  • 32
  • 1
    I'll need more information, because the provider you have installed will vary. 5.4 for instance is only compatible with .Net 1.0/1.1. Are you trying to use Entity Framework also? If you can get me more information I'd be happy to help. – Greg Mar 30 '18 at 15:38
  • seen this? https://www.ibm.com/developerworks/community/forums/html/topic?id=1dd9820c-32c8-4ad2-add5-d97f4fa8ed00 – Furkan Kambay Mar 30 '18 at 15:39
  • There's not a public download site for the iSeries Access for Windows software. You'll need to contact your system operations teams to get the iSeries Access installation CD or install if off the IBM i server. That should provide you the .NET connector you need. – Alex Mar 30 '18 at 15:40
  • What are you compiling as x86 or AnyCPU? – Black Frog Mar 30 '18 at 15:44
  • I successfully used something called connx for years...that did the job... fortunately the mf is now off – Ctznkane525 Mar 30 '18 at 15:48
  • @Alex The IBM website says iSeries Access for Windows is not supported beyond Windows 8.1, and that you should use the IBM i Access Client Solutions instead, which I do have. – Jereme Mar 30 '18 at 16:38
  • @Greg Hi Greg. I'm trying to use this in an ASP.NET Web API that is on .NET 4.6. There is a chance that this will be moving to .NET core 2.1 at some point, too. I am not trying to use Entity Framework; just running queries directly. – Jereme Mar 30 '18 at 17:07
  • @Jereme Do you have the right provider from IBM installed? – Greg Mar 30 '18 at 17:08
  • @Greg Honestly, this is the first time I've tried to do it without the i Access for Windows, so I'm not sure. I installed the IBM i Access Client Solutions (https://www-01.ibm.com/marketing/iwm/iwm/web/reg/download.do?source=swg-ia&S_PKG=dl&lang=en_US&cp=UTF-8&dlmethod=http) which seems to be a Java application with no actual dlls, so I'm not sure about that. I also installed the IBM data server driver package. When I try and install the IBM Database Add-Ins for Visual Studio, it says no supported version of Visual Studio and a .NET Framework are installed. I have VS 2017. – Jereme Mar 30 '18 at 17:23
  • @Jereme Some installers force you to use an earlier version of VS like 2015 but still work, but you have to have the original VS installed first for the application to correctly install sometimes. – Greg Mar 30 '18 at 17:25
  • @Greg I'll install 2015 and give it a shot. I'll let you know if that worked! – Jereme Mar 30 '18 at 17:31
  • @Jereme Well, the IBM install file what version is it compatible with? That's the version you need to install. – Greg Mar 30 '18 at 17:48
  • @Greg So, I installed VS2015, and that allowed me to install the Add-Ins for VS, I then ran Register IBM Database Add-Ins. Unfortunately, I still end up with the same error when I try to connect, so I'm still at a loss. – Jereme Mar 30 '18 at 19:29
  • 1
    @Jereme What I was trying to say Charles answered. – Greg Mar 30 '18 at 20:03

1 Answers1

4

ACS comes in two parts...

universal Java based components, such as the 5250 emulator and database tooling and JDBC drivers.

Platform specific components, for Windows this include ODBC, ADO and .NET drivers.

Sounds like you're missing the Windows components formally known as the IBM i Access Client Solutions - Windows Application Package

** Update **
The Windows, Linux, Mac, and PASE platform application packages are now downloadable from the same ACS Download website as the base Java components.

** Originally **
Unfortunately, the Windows Application Package must be downloaded from IBM's Entitled Systems Support (ESS) website.

This is the same place your IBM i admins would download OS upgrades or optional components of the OS. So they should be able to get you the package you need.

Charles
  • 21,637
  • 1
  • 20
  • 44