Comparing
#4 with
#10
Tags
mssql, sqlsrv, SQL Server
Content
Use SQL SERVER 2000, the date format not like: yyyy/mm/dd hh:mm:ss.
So I change to use SQL SERVER 2008 EXPRESS.
1. download
[PDO MS EXT
from: [](http://www.microsoft.com/download
s/en/details.aspx?
displaylang=en&FamilyID=80e44913-24b4-4113-8807-caae6cf2ca05id=20098 "PDO MS Ext")
2. Install **the [Microsoft SQL Server 2008 R2 Native Client](http://www.microsoft.com/download
s/en/details.aspx?
displaylang=en&FamilyID=80e44913-24b4-4113-8807-caae6cf2ca05 "MS ")
2. setup or release it.id=16978 "Native Client")**
Please read: System Requirements (Microsoft Drivers for PHP for SQL Server)
3. read the manual, copy .dll to PHP Ext Dir, and enable this EXT in php.ini.
I recommendexample:
- PHP 5.3.5 use: [php_pdo_sqlsrv_53_ts_vc6.dll] [php_sqlsrv_53_ts_vc6.dll]
4. config your web main config. like this.
If you use SQL SERVER 2005/2008 The 'connectionString' is not diff.
- PHP 5.3.6 use: [php_pdo_sqlsrv_53_ts_vc9.dll] [php_sqlsrv_53_ts_vc9.dll]
_Note: If you are using WAMP use the thread safe (ts) version_
4. Update your web main config. like this.
```php[...]
// 'class'=>'application.components.MyMsSqlConnection',
// old MS PDO
+ MSSQL 2000:
//'connectionString' => 'mssql:host=HOSTNAME\SQLEXPRESS;dbname=Client',
// new
PDOMS PDO + MSSQL 2005 2008
'connectionString' => 'sqlsrv:Server=HOSTNAME\SQLEXPRESS;Database=Client',
'username' => 'sa',[...]
---
[my site
: www.WinPowerAssistant.com ](http://www.WinPowerAssistant.com "http://www.WinPowerAssistant.com
")