Req #24738 [Opn->Csd]: odbc_connect called twice returns same resource id

From: Date: Sun, 08 Jan 2017 06:24:51 +0000
Subject: Req #24738 [Opn->Csd]: odbc_connect called twice returns same resource id
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206385@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=24738&edit=1

 ID:                 24738
 Updated by:         krakjoe@php.net
 Reported by:        phpbug at tab1 dot clara dot co dot uk
 Summary:            odbc_connect called twice returns same resource id
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            ODBC related
 Operating System:   W2K SP4
 PHP Version:        4.3.2
-Assigned To:        
+Assigned To:        krakjoe
 Block user comment: N
 Private report:     N

 New Comment:

This is yet another ODBC bug that has been open for more than a decade, which hasn't generated
any decent conversation, and there would appear to be no interest in fixing.

There are better drivers in PHP today, and it would seem everyone is using those.

If anyone thinks I'm wrong to close this, please open a PR that improves ODBC.


Previous Comments:
------------------------------------------------------------------------
[2003-07-21 11:29:50] kalowsky@php.net

Known issue, being re-categorized as a Feature Request.  

As a solution, if you change any of the values in the connect call, this should work.  Yes, I know,
this is a pain, but the current system is designed based upon a hash of the DSN/USER/PASSWORD.

------------------------------------------------------------------------
[2003-07-21 11:16:00] phpbug at tab1 dot clara dot co dot uk

Description:
------------
I really did want two different connections since I want to run a sub-query for every row retuned in
the first query. If I try that with one connection I get, not unreasonably: "connection
busy"


Reproduce code:
---------------
<?

$dbconn = odbc_connect("DSNNAME","","");
$dbconn2 = odbc_connect("DSNNAME","","");


print_r($dbconn);
print_r($dbconn2);
?>

Expected result:
----------------
I expected the resouce ID's to be different

Actual result:
--------------
C:\php>cli\php filenote.php
Resource id #5Resource id #5


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



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


Thread (3 messages)

« previous php.bugs (#206385) next »