Problem: DB2 ASP.NET error

Problem: DB2 ASP.NET error

I am trying to use DB2 Connect with a C# front end to create a website and so far it’s been a nightmare.  I’m pretty sure I have the DB2 software installed correctly but I’m running into an error I have no idea how to debug.

Here is the error:

SQL0035N  The file “C:/Applications/CMOL_NET_CSharpmsgen_USdb2nmp.xml” cannot be opened.

And here’s the main code I’m using to connect:

DB2Connection oConn = new DB2Connection(“Driver={IBM DB2 ODBC DRIVER};Hostname=;Database=DB2I;Uid=cdevcmol;Pwd=cdevcmol;”);
DB2DataAdapter oAdapter = new DB2DataAdapter(sFunction, oConn);
DataSet myDataSet = new DataSet();
oAdapter.Fill(myDataSet, “Customers”);

Lost here, TIA,


Solution: DB2 ASP.NET error

I decided to skip the DB2 provider altogether and go with ODBC, it’s working now.