Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2006
    Posts
    26

    Unanswered: Visual Studio DB2 Connection

    Hello,

    I've been trying to open a connection to a db2 server in visual studio to do a test if it is accepting connections. I cannot get my connection string to work (assuming i have the information right)

    "Database=DB2D;UserID=368;Password=pass;Server=130 .101.19.39"
    i am using this with the ibm db2 runtime client. I have tried some stuff with the oledb too with no success as well.

    I will be talking with our database people tomorrow to see if i have the information correct but in the mean time i want to know the i got the connection string right. also is there a port option?

    Thanks guys

  2. #2
    Join Date
    Jun 2006
    Posts
    471
    maybe this can help - have a look
    http://www.databasejournal.com/featu...le.php/3622026
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  3. #3
    Join Date
    Jul 2006
    Posts
    26
    thanks, but i need to do it programatically because the user that this program will be running with will only have connect privileges and this program will be running as a service so i want it to use as few resources as possible. it will not be able to do anything else. i dont really care if i can accesses tables we just need to know that we can successfully open connections to db2.

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by koncept
    "Database=DB2D;UserID=368;Password=pass;Server=130 .101.19.39"
    i am using this with the ibm db2 runtime client. I have tried some stuff with the oledb too with no success as well.
    The runtime client is a type 2 driver. Are you wanting to use the DB2 type 4 universal connection? If so, you will need the appropriate DB2 jars.

    With the type 2 driver, you need to catalog the databases on the client. Withe a type 4 connection, you need to specify the DB2 instance port number somewhere in the connection string.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Jul 2006
    Posts
    26
    i am brand new to db2 but i am familiar with mysql & mssql. from what you have said it sounds like i want a type 4 connection.

    all i want to do is if ping is good to db server then telnet/open a socket connection to db2 port, if good ping db2 connect server if good open a connection to db2 db. if not good alert admins and change the web page on our csm (that part i will take care of).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •