We help IT Professionals succeed at work.

How do I install IBM Data Server .Net Provider for Framework 4.0?

bbwb
bbwb asked
on
Hello.

I have been experiencing some problems with the IBM Data Server .Net Provider for Framework 4.0 and I would appreciate whether someone could provide some assistance.

I have been developing a web application using Visual Studio 2008 and the .Net Framework 3.5.
In order to convert the application to Visual Studio 2010 / .Net Framework 4.0, I have installed the IBM Data Server Driver Package (http://www-933.ibm.com/support/fixcentral/swg/selectFixes?parent=ibm/Information+Management&product=ibm/Information+Management/IBM+Data+Server+Client+Packages&release=9.7.*&platform=Windows+32-bit,+x86&function=fixId&fixids=*dsdriver*FP005&includeSupersedes=0) and the IBM Database Add-Ins for Visual Studio (http://www-933.ibm.com/support/fixcentral/swg/selectFixes?parent=ibm/Information+Management&product=ibm/Information+Management/IBM+Data+Server+Client+Packages&release=9.7.*&platform=Windows+32-bit,+x86&function=fixId&fixids=*vsai*FP005&includeSupersedes=0).
Both installations were executed successfully in a computer running Microsoft Windows XP Professional Version 2002 Service Pack 3.

Following the instructions of page "Validating IBM Data Server Driver Package (Windows) Installation" (http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.swg.im.dbclient.install.doc%2Fdoc%2Fr0058814.html), I ran executables testconn20.exe and testconn40.exe.

testconn20.exe ran successfully:

= = = = =
C:\PROGRA~1\IBM\IBMDAT~1\bin>run_test20

C:\PROGRA~1\IBM\IBMDAT~1\bin>testconn20 -dtc "database=**********;server=***.***
.**.**:****;userid=********;password=*********
adding MSDTC step

Step 1: Printing version info
        .NET Framework version: 2.0.50727.3623
        DB2 .NET provider version: 9.0.0.2
        DB2 .NET file version: 9.7.5.2
        Capability bits: ALLDEFINED
        Build: 20111018
        Factory for invariant name IBM.Data.DB2 verified
        ERROR - Common Informix .NET provider Factory lookup failed - exception
           System.ArgumentException: Unable to find the requested .Net Framework
 Data Provider.  It may not be installed.
   at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariant
Name)
   at TestConn.myClassName.LoadDB2()
        IBM Database Add-ins assembly version: 9.1.0.0
        IBM Database Add-ins file version: 9.7.0.489
        ERROR - IBM Database Add-ins file version different from DB2 .NET provid
er
        Elapsed: 0.25

Step 2: Validating db2dsdriver.cfg against db2dsdriver.xsd schema file
        File C:\Documents and Settings\All Users\Application Data\IBM\DB2\IBMDBC
L1\cfg\db2dsdriver.cfg  missing. Nothing to validate
        Elapsed: 0

Step 3: Connecting using "database=new_mexico;server=192.168.15.31:9502;userid=i
nformix;password=Nextworld"
        Server type and version: IDS 11.50.0000
        Elapsed: 2.609375

Step 4: Selecting rows from informix.systables to validate existence of packages

   SELECT * FROM informix.systables
        Elapsed: 0.15625

Step 5: Calling GetSchema for tables to validate existence of schema functions
        Elapsed: 0.1875

Step 6: Creating XA connection
        DB2TransactionScope: Connection Closed.
        Elapsed: 3.34375

Test passed.
= = = = =


But testconn40.exe failed:

= = = = =
C:\PROGRA~1\IBM\IBMDAT~1\bin>run_test40

C:\PROGRA~1\IBM\IBMDAT~1\bin>testconn40 -dtc "database=**********;server=***.***
.**.**:****;userid=********;password=*********
adding MSDTC step

Step 1: Printing version info
        .NET Framework version: 4.0.30319.235
        System.IO.FileNotFoundException: Could not load file or assembly 'IBM.Da
ta.DB2, Version=9.0.0.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208' or on
e of its dependencies. The system cannot find the file specified.
File name: 'IBM.Data.DB2, Version=9.0.0.4, Culture=neutral, PublicKeyToken=7c307
b91aa13d208'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String cod
eBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&
stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppre
ssSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String code
Base, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& s
tackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppres
sSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName as
semblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntr
ospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evid
ence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at TestConn.myClassName.LoadDB2()
   at TestConn.myClassName.PrintVersionInfo()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\M
icrosoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure lo
gging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fus
ion!EnableLog].

Test failed.
= = = = =


I have been told that the error might have been caused because I did not uninstall the Beta version before installing the "final" version of the packages (http://www.ibm.com/developerworks/forums/thread.jspa?threadID=368836&tstart=0).

Well, yesterday was the very first time I installed these packages and my assumption was that both links mentioned in the beginning of the post pointed to the "final" version of the packages.

These were the packages I installed:
v9.7fp5_nt32_dsdriver_EN.exe
v9.7fp5_nt32_vsai.exe

Comments or suggestions on how to fix this problem would be very much appreciated.
Thank you in advance.
Comment
Watch Question

Carlos VillegasFull Stack .NET Developer

Commented:
Hello, be sure that your testconn40.exe is running at 32bits, I see that you have installed this component, v9.7fp5_nt32_dsdriver_EN.exe, its name says me that it is a 32bit component, so probably it is installed on the 32bit GAC, if your application runs at 64bit it can't load the assemblies installed by  v9.7fp5_nt32_dsdriver_EN.exe, so if that is your case, try installing the 64bit version of your component.
Carlos VillegasFull Stack .NET Developer

Commented:
Or running testconn40.exe at 32bits...
Carlos VillegasFull Stack .NET Developer

Commented:
Project Settings

Author

Commented:
Hello, yv989c.

Thank you for your comments.

Since my computer runs Microsoft Windows XP Professional Version 2002 Service Pack 3, I believe the 32-bit version is the correct one.
Carlos VillegasFull Stack .NET Developer

Commented:
Ok, then try to find the file IBM.Data.DB2.dll in your system, maybe in your Program Files folder? (e.g. some folder inside C:\Program Files\IBM\), when you find it, use gacutil to add it to the GAC, example:
gacutil.exe /i IBM.Data.DB2.dll

More info about gacutil:
http://msdn.microsoft.com/en-us/library/ex0ss12c(v=VS.100).aspx
Commented:
Although both installations ended successfully, I decided to uninstall and reinstall everything.
The problem was solved.

Author

Commented:
.

Author

Commented:
.