SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Connecting to a DB2 Database using PHP and ADOdb

    Hi,

    I'm trying to connect to a DB2 database on an AS400 server on my local network, using PHP and the ADOdb library.

    There is some documentation on doing this here

    Here is the code to connect to DB2
    Code:
    $db =& ADONewConnection('db2');
    	$dsn = "driver={IBM db2 odbc DRIVER};Database=sample;hostname=localhost;port=50000;protocol=TCPIP;".
    			"uid=root; pwd=secret";
    	$db->Connect($dsn);
    But when I do this I get an Error Message IM002 telling me that I have not specified the ODBC driver.

    Checking the documentation, the is a prerequisite for this connection. I need to have a DB2 CLI/ODBC interface. What is this? any Ideas on where to get this missing driver I need?

    I need this driver for Windows XP, and also a version for Ubuntu Linux Server 6.06 LTS.

    If anyone knows where to get this I would really appreciate your help.

    Thanks.

  2. #2
    SitePoint Member
    Join Date
    Aug 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


Bookmarks

Posting Permissions

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