ID: 9982
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: ODBC related
PHP Version: 4.0.4
Assigned To: 
Comments:

what is $dbname, and is it possible you've run out of available ODBC connections with 
your first example?  you are opening up N number of OBDC connections...

and finally does this still exist in the current 4.0.5 or even 4.0.4pl1 releases?

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

[2001-03-25 22:42:20] [EMAIL PROTECTED]
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...






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



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9982&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to