Jump to content

Connection Error


Recommended Posts

I was an ASP programmer and now trying to convert to php.  I cannot get my driver to connect to the database.  The issue is the same if I use PDO or the older method. 

 

Here is the connection string...

 

try {
  # MS SQL Server and Sybase with PDO_DBLIB
  $DBH = new PDO("mssql:host=$hostname; dbname=$database;" , $username, $password);
  echo "Connected to Test<br>";
}
catch(PDOException $e) {
    echo "Error=" . $e->getMessage();
}

 

Here is the result...

Error=could not find driver

 

I have found this page and done everything on it but still does not connect....

http://stackoverflow.com/questions/2852748/pdoexception-could-not-find-driver

 

Any ideas?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.