Hi...I am using DB2 .net provider to connect to mainframe DB from .Net.
Earlier when compiling the project was facing an error saying, there was a conflict with the IBM.Data.db2.dll version (9.7.3.2). So then copied a different version (9.1.6.1) dll to C:\Program Files\IBM\SQLLIB\BIN location. Now the project is getting compiled but getting an initialization error with DB2.Net data provider
Please anyone suggest me what i need to do ?
Below is the error description
Thanks
SQL1159 Initialization error with DB2 .NET Data Provider, reason code 2, tokens C:\Billing Group\NetSolutions\DirectBill\DirectBill_UI\bin\db 2app.dll,
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: SQL1159 Initialization error with DB2 .NET Data Provider, reason code 2, tokens C:\Billing Group\NetSolutions\DirectBill\DirectBill_UI\bin\db 2app.dll,
Source Error:
Line 63: public class requestData
Line 64: {
Line 65: private DB2Connection cnDB2 = new DB2Connection();
Line 66: private DB2Command cdDB2 = new DB2Command();
Line 67: private DB2DataAdapter daDB2 = new DB2DataAdapter();
Source File: c:\billing group\netsolutions\directbill\directbill_da\direct bill.cs Line: 65
Stack Trace:
[InvalidOperationException: SQL1159 Initialization error with DB2 .NET Data Provider, reason code 2, tokens C:\Billing Group\NetSolutions\DirectBill\DirectBill_UI\bin\db 2app.dll, ]
IBM.Data.DB2.f.a()
IBM.Data.DB2.DB2ConnPool.e()
IBM.Data.DB2.DB2ConnPool..ctor()
IBM.Data.DB2.DB2Connection..cctor()
[TypeInitializationException: The type initializer for "IBM.Data.DB2.DB2Connection" threw an exception.]
IBM.Data.DB2.DB2Connection..ctor() +0
DirectBill_DA.requestData..ctor() in c:\billing group\netsolutions\directbill\directbill_da\direct bill.cs:65
DirectBill_UI.inquiry.Page_Load(Object sender, EventArgs e) in c:\billing group\netsolutions\directbill\directbill_ui\inquir y.aspx.cs:41
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
------------------------------------------------------ Version Information: Microsoft .NET Framework Version:1.1.4322.2470; ASP.NET Version:1.1.4322.2470