I'm unable to connect to MSSQL database on asphostportal I'm using:
PHP Tools for Visual Studio
Here is the code:
$conn = new PDO("mssql:host=host_name_string;dbname=database_name_string", "username_string", "password_string");
// set the PDO error mode to exception
echo "Connected successfully";
echo "Connection failed: " . $e->getMessage();
and the error caught by the PDOexception class:
Connection failed: could not find driver
I've also tested my code online and again getting the same error
I've searched for the solution and the only thing that could resolve my problem is by uncommenting:
but the line is already uncommented by default.
EDIT: The following does not ressolve my problem (instead of mssql:host)
--moderator update: post approved, and moved to the MySQL forum. jw.
[Updated on: Thu, 15 December 2016 02:51] by Moderator
Report message to a moderator