请按照以下步骤查找错误原因
Step1:使用telnet连接。
xxx@ubuntuvbox:~$ telnet 10.1.1.1 5000
Trying 10.1.1.1...
Connected to 10.1.1.1.
第二步:配置 FreeTDS
编辑 freetds.conf,位于 /etc/freetds/ (Ubuntu 11.10)
[global]
# TDS protocol version
tds version = 5.0
text size = 64512
第 3 步:使用 FreeTDS 连接
xxx@ubuntuvbox:~$ sqsh -S 10.1.1.1:5000 -Usa
sqsh-2.1 Copyright (C) 1995-2001 Scott C. Gray
This is free software with ABSOLUTELY NO WARRANTY
For more information type '\warranty'
Password:
Msg 2401, Level 11, State 2
Server 'XXXXXX'
Character set conversion is not available between client character set 'utf8'
and server character set 'cp850'.
No conversions will be done.
1> select * from .....
第 4 步:使用 FreeTDS 与 PHP 连接
检查这个...
$dbh = new PDO ('dblib:host=10.1.1.1:5000;dbname=databasename','sa','password');