我现有一程序在Delphi环境中使用没有问题, 可离开Delphi,再使用时就出现(Login fail user for 'sa'), 以前数据库挂在win2000中没有这个问题, 后来服务器升级到win2003之后就出现这样的问题了,我真是百思不得期解.代码为: ADOCommand1.ConnectionString :='Provider=SQLOLEDB.1;Password=000000;'+
'Persist Security Info=True;User ID=sa;Initial Catalog=Test;'+
'Data Source=DataBase';
ADOCommand1.CommandText:='insert into rec select ''0'',''ID'',''''';
try
ADOCommand1.Execute;
except
Showmessage('Fail');
end;就这么几句
'Persist Security Info=True;User ID=sa;Initial Catalog=Test;'+
'Data Source=DataBase';
ADOCommand1.CommandText:='insert into rec select ''0'',''ID'',''''';
try
ADOCommand1.Execute;
except
Showmessage('Fail');
end;就这么几句
解决方案 »
- fastreport3如何使用报表显示出来??
- 请问这个record的句子是什么意思?没见过这样子写的。谢谢
- 如何获得一个已知进程名的句柄??
- 如何使用gifimage缩图,请高手指教,小弟拜谢!
- 怎样实现数据库备份!
- 如何使用ADOConnection动态连接远程SQLServer数据库(在线等待)
- 如何给TreeView的TreeNode加字体和颜色?
- 分组报表中的加总问题---在线等待,高手救命
- 报表中的图表x或y能动态赋值吗?
- 如何将3-5M文件上传到NT SERVER,不能使用FTP,而且通过SOCKET会丢失包
- 招聘Delphi高级开发工程师及项目经理(北京)
- ■■■看到一个软件,他的窗体上的按钮的功能是可以通过VBS脚本自定义的,比如说:向窗口发送消息,启动其他程序等等。这是如何做到的?
如设置了不同的密码什么的。然后你的程序用sa 就无法访问升级后的数据库了。你可以打开程序,重新设置数据库连接,然后重新编译,再看看。
我推荐使用SQL密码验证。
'User ID=sa;Initial Catalog=Test;'+
'Data Source=DataBase';
ADOCommand1.CommandText:='insert into rec select ''0'',''ID'',''''';
try
ADOCommand1.Execute;
except
Showmessage('Fail');
end;
楼主试试吧!!