none
Does anyone knows how can I import the namespace IBM.Data.DB2?? RRS feed

  • Question

  • Does anyone knows how can I import the namespace IBM.Data.DB2??

     

    -I already have DB2 6.1 Run-Time Clients installed on my machine.

     

     

     

    Friday, May 7, 2010 7:14 PM

Answers

  • yes, you can use ODBC without  much toruble. Only thing is use a common user to access DB2 files, else it will cause runtime issues when diffrent credentials has been used.

    Connection string will look like this

    this.ConnectionString = "DSN=QQ_AS400DUB;UID=PROPDAMTST;PWD=XXXX"


    Thanks Mike -------- Mark best answers as Answer ----------
    • Marked as answer by R. Wagner Tuesday, May 11, 2010 11:36 AM
    Monday, May 10, 2010 2:28 PM

All replies

  • If you're using Visual Studio, you should be able to add a Reference to the assembly from your project and then use the appropriate construct (using for C# or Imports for VB) to easily access the provider from your code.  If the provider is registered in the GAC, it should show up in the .NET tab.  If not, you may need to use the Browse tab and locate the assembly manually.

    I hope this information proves helpful.


    David Sceppa
    Friday, May 7, 2010 9:21 PM
    Moderator
  • Hi David,

    but this is exactly my problem, i'm not able to reference the assembly in my project. I want to know how can I do that..

    and I can´t find the assembly on my machine too.

    thanks

    Monday, May 10, 2010 11:30 AM
  • another thing we may take in consideration is that the version of DB2 that is running on the server is the version 5 (very old).
    Monday, May 10, 2010 11:55 AM
  • to add add DB2 data provider, you need to have IBM iSeriesAccess installed on the machine. Which installs data provider ( you need to select this during the installation, by default it won't get installed). Once you have iSeries installed, you will able to add refrence via Project->Add Ref.

     


    Thanks Mike -------- Mark best answers as Answer ----------
    • Proposed as answer by liurong luo Tuesday, May 11, 2010 10:43 AM
    Monday, May 10, 2010 12:29 PM
  • I don't have the IBM iSeriesAccess installed in my computer.

    Is this software free? where can I download it?

    I just found the service pack: http://www-03.ibm.com/systems/i/software/access/windows/casp.html

    but this is not the software.

     

    thankss!!

    Monday, May 10, 2010 1:45 PM
  • IBM iSeries for windows  is Not a free tool. You need to get Licence from IBM to use it. They are providing Installation file online.

    Since you said, you already have an DB2 running, then you can ask System administrator  to install iSerises from “workLink” . Most probably, they will have installation image stored over there.

     


    Thanks Mike -------- Mark best answers as Answer ----------
    Monday, May 10, 2010 2:05 PM
  • Helo Mike,

    i'm almost giving up using this method for connection (.Net provider).

    do you recommend using ODBC? have you ever had this experience (connect with ODBC)?

    very thanks for your replies

     

    Monday, May 10, 2010 2:18 PM
  • yes, you can use ODBC without  much toruble. Only thing is use a common user to access DB2 files, else it will cause runtime issues when diffrent credentials has been used.

    Connection string will look like this

    this.ConnectionString = "DSN=QQ_AS400DUB;UID=PROPDAMTST;PWD=XXXX"


    Thanks Mike -------- Mark best answers as Answer ----------
    • Marked as answer by R. Wagner Tuesday, May 11, 2010 11:36 AM
    Monday, May 10, 2010 2:28 PM
  • Thanks mike! it works!!

    Tuesday, May 11, 2010 11:36 AM