PEAR DB/DataObjects and MSSQL

From: Date: Tue, 09 Mar 2004 00:15:38 +0000
Subject: PEAR DB/DataObjects and MSSQL
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11170@lists.php.net to get a copy of this message
Hi folks, I'm in the process of setting up an application that will use a Linux/Apache (RH9.0, Apache 2.0) web-server that accesses data from a Windows SBS 2003 server running MSSQLSERVER. I built a small test harness to check the connection : <code> <? require_once ("DB.php"); require_once('PEAR.php'); require_once("Var_Dump.php"); //$DSN = "mssql://hpfm:hpfm@192.168.6.200/master"; $DSN = "mssql://hpfm:hpfm@SLSA1/Membership"; $options = array('debug' => 3); $db =& DB::connect($DSN,$options); if (DB::isError($db)) { /* * This is not what you would really want to do in * your program. It merely demonstrates what kinds * of data you can get back from error objects. */ echo 'Failed Standard Message: ' . $db->getMessage() . "\n"; Var_Dump::display($db); } else { echo "Yahoo!!! <b>we're connected! </b><br>"; $db->disconnect(); } // ... ?> </code> I get the following error message Failed Standard Message: DB Error: no such database To date I have done nothing in terms of configuring PHP or loading utilities such as ODBTP. Has anyone out there had much experience in this area that might help? Thanks Barry

« previous php.pear.general (#11170) next »