Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    11

    Unanswered: Using ODBC API in php to connect to DB2

    Hi,

    I am using ODBC api in PHP to connect to DB2 database. It is working fine but slow and lots and lots of locking. I came to know that all the transactions in DB2 are read/write and i want to change this setting.

    I read about setOption() in ODBC api -
    http://us2.php.net/manual/en/functio...-setoption.php

    Then i have poked IBM site to see detail description about ODBC support.

    http://publib.boulder.ibm.com/infoce...jnemstr115.htm

    The above link shows that this function is deprecated and the other function which has replaced this is

    http://publib.boulder.ibm.com/infoce...jnemstr115.htm

    But there is no mention of this new function in php odbc api. Further odbc api is calling these functions by some numbers, so what is the number for this new function?

    My intention for tweaking some odbc connection parameters is to make all my select transactions read only so that i will have less locks on my objects and eventually quicker response time.

    If anyone has done this, please throw some light on this issue.

    Thanks!

  2. #2
    Join Date
    Aug 2006
    Posts
    7

  3. #3
    Join Date
    Oct 2003
    Posts
    11
    Hi,

    Thanks for writing these articles which will really help many people in understanding how to connect to db2 from php.

    If you read my post, i was able to connect/extract data from DB2 using PHP but the real problem was the way DB2 locks its objects. I have tried using
    " for ready only" or " with read only" or " with UR"
    in my sql queries but there was no good result.

    When i use some other database i.e. firebird, it provides me the provision of metioning what kind of transaction I am doing using ODBC connection but with DB2 i can't do that. If there is a way please inform me.

    If you are interested you can read my post about the same here

    http://www-128.ibm.com/developerwork...=123414&cat=19,

    Anyway, thanks for writing such a nice of article.

    Cheers!

Posting Permissions

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