I set this up using the download package available on the Microsoft site. The site is working but I tried to set up Drush, and when using Drush I get the following error:

Fatal error: Undefined class constant 'SQLSRV_ATTR_DIRECT_QUERY' in C:\Users\karen\Documents\My Web Sites\Drupal 7 Developer release1\includes\database\sqlsrv\database.inc on line 60
Drush command could not be completed. 

I checked the latest version of database.inc in the git repository and I can't see that this constant is defined anywhere. No idea why it only seems to be a problem when I use Drush.

Comments

damien tournoud’s picture

Most probably, you are using a different PHP binary between the web server and Drush? The PDO driver doesn't seem to be enabled in the PHP command line binary.

damien tournoud’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)
karens’s picture

Sorry, I got diverted to other things and haven't checked back. That is a possibility, I have more than one version of PHP on this machine. I will try to confirm that when I can get back to this.

artusamak’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)
ramkishan.naudiyal’s picture

Fatal error: Undefined class constant 'SQLSRV_TXN_READ_UNCOMMITTED' in C:\inetpub\wwwroot\Drupal\drivers\lib\Drupal\Driver\Database\sqlsrv\DriverSettings.php on line 95

Just before today,drupal working fine. But now suddenly this error comes .. I am not getting a way to resolve this issue.Please find a way for me.