Problem connecting Informix having SDK 2.5 and 3.0
Posted in 2008
Topics: Installation, Setup & Upgrades
Hi, We are working with an application that is using Informix SDK 3.0. The application is working fine with the SDK 3.0. We actually would like to setup our application on a machine where SDK 2.5 is already installed and some other application using that version. Now we want to install SDK 3.0 on the same machine and use our application. When we are testing we came to know that the application is not working when the machine has both SDK 3.0, it is throwing the following error while connecting: "The type initializer for 'IBM.Data.Informix.IfxConnection' threw an exception." The application worked fine on the same machine after the SDK 2.5 uninstalled. Can anyone help us in resolving this issue? Thanks in advance, Ramesh
First of all, CSDK 2.5 didn't have .NET Provider (IBM.Data.Informix.dll). To me it appears that in your environment CSDK 2.5 is set before CSDK 3.0 For example, when you open command window and say "which setnet32.exe" what do you get? Do you get from CSDK 2.5 or CSDK 3.0? I think here you are getting from CSDK 2.5 !! So you seem to have something like this in your PATH ...;%CSDK250%\\\\bin;....;%CSDK300%\\\\bin; ... Since .NET Provider is dependent on ODBC DLL iclit09b.dll and which is also available with CSDK 2.5 you seem to have mismatch of DLLs hence the error. Possible solutions: ------------------------ -Don't have two CSDK installed on the same machine. Infact why one would want to do that? - You seem to have going thorugh this solution. And I would also recommend the same. -If you still want to have CSDK 2.5 and CSDK 3.0, make sure that your environments are separate based on your need(application) of CSDK 2.5 OR CSDK 3.0 Thanks -Shesh "VENKATESH BHUPATHI" <bhupav@amvescap.com> Sent by: ids-bounces@iiug.org 06/02/2008 18:46 Please respond to ids@iiug.org To ids@iiug.org cc Subject Problem connecting Informix having SDK 2.5 and 3.0 [11181] Hi, We are working with an application that is using Informix SDK 3.0. The application is working fine with the SDK 3.0. We actually would like to setup our application on a machine where SDK 2.5 is already installed and some other application using that version. Now we want to install SDK 3.0 on the same machine and use our application. When we are testing we came to know that the application is not working when the machine has both SDK 3.0, it is throwing the following error while connecting: "The type initializer for 'IBM.Data.Informix.IfxConnection' threw an exception." The application worked fine on the same machine after the SDK 2.5 uninstalled. Can anyone help us in resolving this issue? Thanks in advance, Ramesh ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum. See you at the IIUG Informix 2008 Conference The Power Conference for Informix Professionals April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas http://www.iiug.org/conf Registration Now Open!!
Thanks for your response Shesh, Based on your suggestion , we UnInstalled CSDK2.5 and Installed CSDK3.0 only,with this we couuld Resolve the probelm what we asked in the forum.But at this point we are facing new problem,From C#.net2.0 connecting to IDS Database with the help of IBM.Data.Informix.3.00.02000.dll , if we executing my Application locally working fine,But if we executing from the server got the following error "The type initializer for 'IBM.Data.Informix.IfxConnection' threw an exception." Can you Resolve this. Advanced Thanks
Did you try adding IBM.Data.Informix.dll into GAC (Global Assembly Cache)? If not, I would suggest you do that, open VS2005 command window, go to %INFORMIXDIR%\\\\bin\\ etf20 and issue command "gacutil /i IBM.Data.Informix.dll". You might also try rebooting your machine after doing GAC and if it still doesn't work. Sometime rebooting in MS world helps .. :). By the way, when you said "server" you meant ASP.NET kind of an application talking to Web Server OR something else? Thanks -Shesh "VENKATESH BHUPATHI" <bhupav@amvescap.com> Sent by: ids-bounces@iiug.org 11/02/2008 17:25 Please respond to ids@iiug.org To ids@iiug.org cc Subject Re: Problem connecting Informix having SDK 2.5 and [11271] Thanks for your response Shesh, Based on your suggestion , we UnInstalled CSDK2.5 and Installed CSDK3.0 only,with this we couuld Resolve the probelm what we asked in the forum.But at this point we are facing new problem,From C#.net2.0 connecting to IDS Database with the help of IBM.Data.Informix.3.00.02000.dll , if we executing my Application locally working fine,But if we executing from the server got the following error "The type initializer for 'IBM.Data.Informix.IfxConnection' threw an exception." Can you Resolve this. Advanced Thanks ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum. See you at the IIUG Informix 2008 Conference The Power Conference for Informix Professionals April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas http://www.iiug.org/conf Registration Now Open!!