日期:2014-05-18  浏览次数:20361 次

delphi、sqlserver2000开发的程序在win7下运行出现sa登陆失败
delphi、sqlserver2000开发的程序在win7下运行出现sa登陆失败,数据库配置为身份验证sqlserver和windows
程序中连接数据库代码
 if AWin32Version>5.1 then
  ADOConnection1.ConnectionString:='Provider='+Providerstr+';User ID='+UserIDstr+';Persist Security Info=True;Password='+Passwordstr+';Data Source='+DataSourceStr+';Initial Catalog='+DatabaseNamestr

  else ADOConnection1.ConnectionString:='Provider='+Providerstr+';User ID='+UserIDstr+';Password='+Passwordstr+';Data Source='+DataSourceStr+';Initial Catalog='+DatabaseNamestr
;
不知是何原因

------解决方案--------------------
如果是连接参数不对,建议你去delphi那边问问.
------解决方案--------------------
在软件里把连接字符串打印出来看看字符串是不是对的就行吗。如果字符串是对的还连不上检查网络端口防火墙 服务等等。。