PHP连接本机MS SQL2000成功,但连接其它计算机的SQL SERVER出现错误:
Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in C:\AppServ\www\sql.php on line 10Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: ysdg-five in C:\AppServ\www\sql.php on line 10
Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in C:\AppServ\www\sql.php on line 10Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: ysdg-five in C:\AppServ\www\sql.php on line 10
是windows,还是混合验证模式!
<?
$link=mssql_connect("ysdg-five","sa","525321");
mssql_select_db("kqdata");
$sqlstr="select top 10 * from personal";
$result=mssql_query($sqlstr,$link);
$row=mssql_num_rows($result);
echo $row;
mssql_free_result($result);
mssql_close($link);
?>
php版本?php5之前可以用mssql,之后可以选择PDO
Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: ysdg-five in C:\AppServ\www\sql.php on line ..
所以,请你再次确认,你用客户端工具能连上 ysdg-five 吗?