odbc_connect vs. DB2 (Connection speed varies)
| From: | Scott Fletcher | Date: | Thu, 07 Feb 2002 20:56:37 +0000 |
| Subject: | odbc_connect vs. DB2 (Connection speed varies) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-83910@lists.php.net to get a copy of this message | ||
Hi!
Have anyone ever have problem with the connection speed using PHP and
DB2? I'm a little puzzled by the odbc_connect reaction. There were very
many people using the DB2 on the website. The most I can have is from 5 to
10 people. For some people, they get quick result from the database using
PHP and for some other, it take longer and get the connection timeout saying
"Unable to connect to Database!!!". What's up with that?
Here's the PHP code I use for the odbc_connect to IBM DB2 (database). Would
include the SQL_CUR_USE_ODBC help? I read that part on the PHP website
under the "odbc_connect".
-- clip here --
$database = "TEST_DB";
$user = "db2inst1";
$pass = "ibmdb2";
$cid = @odbc_connect($database,$user,$pass) or die("Unable to connect to
Database !!!") ;
if ($cid == 0)
{
exit("<br><br><font color='red'><b>Unable to connect to
Database
!!!</b></font><br><br>");
}
-- clip end --
Thanks,
Scott