MikeBronner
Programmer
Hi guys and gals,
I am trying (in vain it seems) to connect to our SQL server here using PEAR with the following code:
The values used for the DSN are set in the class constructor . When I run this I get the following error returned from PEAR:
B:
Take Care,
Mike
I am trying (in vain it seems) to connect to our SQL server here using PEAR with the following code:
Code:
public function connect()
{
try
{
$dsn = $this->_s_type . '://' . $this->_s_username . ':' . $this->_s_password . '@' . $this->_s_server . '/' . $this->_s_database;
$db = DB::connect($dsn);
if (PEAR::isError($db)) {throw new Exception($db->getMessage());}
else
{
$this->_r_connection = $db;
return true;
}
}
catch(exception $error)
{
return false;
}
}
Eventhough I can connect to the server using the same information via the native PHP function mssql_connect()DB Error: connect failed
, etc. Any ideas?$connection = mssql_connect('server', 'username', 'password')
Take Care,
Mike