PHP 4.0 Bug #9982: odbc_tables fails without closing previous database

From: Date: Mon, 26 Mar 2001 03:42:21 +0000
Subject: PHP 4.0 Bug #9982: odbc_tables fails without closing previous database
Groups: php.dev 
Request: Send a blank email to php-dev+get-49922@lists.php.net to get a copy of this message
From: badams@ingenico.com.au Operating system: winnt4 sp 6 PHP version: 4.0.4 PHP Bug Type: ODBC related Bug description: odbc_tables fails without closing previous database If calling odbc_tables in a loop the database connection must be closed before callign odbc_tables again. Error Exception: access violation 0xc0000005) eg This FAILS for($i=0; $i<sizeof($dbname); $i++) { $conn = odbc_conn($dbname[$i], $name, $pword); $res = odbc_tables($conn); $n = 1; while( odbc_fetch_row($res, $n)) { ... } } odbc_close_all( ); Yet this works fine for($i=0; $i<sizeof($dbname); $i++) { $conn = odbc_conn($dbname[$i], $name, $pword); $res = odbc_tables($conn); $i = 1; while( odbc_fetch_row($res, $i)) { ... } odbc_close_all( ); } Thanks in advance... -- Edit Bug report at: http://bugs.php.net/?id=9982&edit=1

« previous php.dev (#49922) next »