[PHP-DEV] PHP 4.0 Bug #6105 Updated: odbc_pconnect returns 'not a valid ODBC-Link resource' From: sniper <email protected>
Date: 01/02/01

ID: 6105
Updated by: sniper
Reported By: wls <email protected>
Old-Status: Open
Status: Feedback
Bug Type: ODBC related
Assigned To:
Comments:

Previous Comments:
---------------------------------------------------------------------------

[2000-08-31 09:04:23] stas <email protected>
reclassify

---------------------------------------------------------------------------

[2000-08-11 07:42:01] wls <email protected>
Changing odbc_connect to odbc_pconnect causes the script to fail, complaining that the $odbchandle "Supplied resource is not a valid ODBC-Link resource" on a odbc_close($odbchandle). Leaving the code as is works perfectly.

...
    // Connect to the database
    $odbchandle = odbc_connect( $DSN, $USERNAME, $PASSWORD );

    if ( $odbchandle ) {

      // Query for the user record
      $query = "SELECT * FROM Subscribers WHERE SubscriptionID='" . $subscriberID . "'";

      $queryresult = odbc_do( $odbchandle, $query );

      // ...
      odbc_close( $odbchandle );
...

It _seems_ that commenting out the odbc_close() when using the odbc_pconnect() causes the warning to go away. Naturally this begs the question about when persistent handles go away... but still, I wouldn't think odbc_close() causes a warning. Using odbc_close_all() works just fine, with no warning.

---------------------------------------------------------------------------

Full Bug description available at: http://bugs.php.net/?id=6105

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>