FaaPz / PDO

Just another PDO database library
MIT License
316 stars 103 forks source link

Setting \PDO::ATTR_ERRMODE doesn't work for SQLSRV #39

Closed MitchProbst closed 8 years ago

MitchProbst commented 8 years ago

Creating a new Database instance with SQLSRV throws the following:

The given attribute is only supported on the PDOStatement object.

$pdo = new \Slim\PDO\Database($dsn, $username, $password);

If I comment out the following line, the error doesn't get thrown and I can use the database object as intended.

\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,