程连接支持2005
程连接支持2005
2012-11-02 16:14:33
字体放大:
程_sqlsrv_52_ts_vc6.dll (线程安全)
程_sqlsrv_52_nts_vc6.dll (非线程安全)
vc6用于Apache,vc9用于IIS
2.修改程.ini
extension=程_sqlsrv_52_ts_vc6.dll
3.下载sqlncli.msi,微软官方可以下
安装的时候提示是sql server 2008的,不过2005也是可以用的。
4.测试代码
代码
"test","PWD"=>"test");$conn = sqlsrv_connect($serverName, $connectionInfo);if($conn) { echo "Connection established.
";} else { echo "Connection could not be established.
"; die( print_r(sqlsrv_errors(), true)); exit();}$sql = "select * from T_Employee";$result = sqlsrv_query($conn,$sql);$data = array();while($row=sqlsrv_fetch_array($result)) { $data[] = $row;}foreach($data as $p) { echo $p['Name']."
";}sqlsrv_close($conn);echo "
Done
";echo date("Y-m-d h:i:s");?>
下一篇:程计算出当天时间的起始点与结束的备忘
将此信息分享到: