1、我按李颖的建议用TDatabase控件来连接数据库,登陆不上服务器.
我在一ButonClick事件中填写的程序如下:
with Database1 do
begin
Close;
with Params do
begin
Clear;
Add('Server Name = OAS01');
Add('Database Name = master');
Add('User Name = sa');
Add('Password = tlz');
end;
try
Open;
except
ShowMessage('好背啊!登录失败了!! >:-<<');
end;
end;