ID:               27932
 Updated by:       [EMAIL PROTECTED]
 Reported By:      shagren at ua dot fm
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: Win98
 PHP Version:      4.3.4
 New Comment:

It's there: "You can have multiple connections open at once as long as
they either use different db or different credentials."


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

[2006-01-17 16:23:45] shagren at ua dot fm

I cannot find this info at
http://www.php.net/manual/en/function.odbc-connect.php

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

[2004-04-10 06:50:51] [EMAIL PROTECTED]

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.



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

[2004-04-09 11:32:40] [EMAIL PROTECTED]

>From php_odbc.c:

" * We do have to hash non-persistent connections, and reuse
connections.
 * In the case where two connects were being made, without closing the
first
 * connect, access violations were occuring.  This is because some of
the
 * "globals" in this module should actualy be per-connection variables.
 I
 * simply fixed things to get them working for now.  Shane
"

This has been in it since 1999. (manual says you can have multiple
connections and that is true as long as they either use different db or
different credentials.)


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

[2004-04-09 09:43:16] shagren at ua dot fm

Description:
------------
I use 2 odbc connection to ms-access database.
When i close second connection, i cannot free result from first
connection - php show warning.

And first and second connections have identical resource id.

Reproduce code:
---------------
<?php
error_reporting(E_ALL);

//make 2 connection(ms-access database)
$conn1 = odbc_connect("test_access", "", "");
$conn2 = odbc_connect("test_access", "", "");

//echo connection id
echo "Connection1: $conn1 \nConnection2: $conn2\n";

//exec query
$result = odbc_exec($conn1, "select count(*) from temp_table");

//close connection2
odbc_close($conn2);

//free result from connection1
odbc_free_result($result);
?>

Expected result:
----------------
Connection1: Resource id #1
Connection2: Resource id #2


Actual result:
--------------
Connection1: Resource id #1
Connection2: Resource id #1
PHP Warning:  odbc_free_result(): 2 is not a valid ODBC result resource
in C:\Temp\test3.php on line 18



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


-- 
Edit this bug report at http://bugs.php.net/?id=27932&edit=1

Reply via email to