PEAR question about DB connet of MSSQL
| From: | Claire@Hinet | Date: | Wed, 28 Aug 2002 12:11:54 +0000 |
| Subject: | PEAR question about DB connet of MSSQL | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-8707@lists.php.net to get a copy of this message | ||
Dear Sir/Madam:
Please forget my poor english.
How can I connet MicroSoft SQL server by using Pear?
Here is my code:
----------------------------------------------------
PHP:
$MsSQL = new DB;
$DSN = "mssql://phpuser:123456@123.123.123/members";
$DB = DB::connect($DSN);
// check error
if( $MsSQL->isError($DBH) ) {
echo $MsSQL->errorMessage($DBH);
die();
}
----------------------------------------------------
I had successed in Mysql while use such configuration.
But I don't know why it return a error message:"No such database" when I
used MSSQL.
(I do sure that the database named 'members' exists.)
Thanks for ur help.
Best Regards,
Claire Y. Huang