I am trying to access a MS SQL server using Windows Authentication. I found an example and tried to follow that (see code below), but every time I load the page I get
exception 'PDOException' with message 'could not find driver' in C:\wamp\www\test.php:34 Stack trace: #0 C:\wamp\www\test.php(34): PDO->__construct('sqlsrv:Server=P...', NULL, NULL) #1 {main}"
<?php
try {
$conn = new PDO( "sqlsrv:Server=SERVERHOSTNAME/DPA1" );
$conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
}
catch( PDOException $e ) {
echo $e;
}
?>