语句如下:
function OpenADOConn:boolean;
begin
result:=false;
try
with FDM.ADOConnection1 do
begin
Connected:= false;
Provider:= 'SQLOLEDB.1';
Properties['Data Source'].Value:= '192.168.0.4'; //服务器名
Properties['Initial Catalog'].Value:= 'xxgl'; //表名
Properties['User ID'].Value:= 'sa'; //用户名
Properties['password'].Value:= '123'; //密码
LoginPrompt:= false;
try
Connected:= true;
except
begin
Application.MessageBox('无法连结远程数据库!','注意', MB_OK);
exit;
end;
end;
end;
finally end;
result:=true;
end;为什么会提示“无效的授权说明”呢?
function OpenADOConn:boolean;
begin
result:=false;
try
with FDM.ADOConnection1 do
begin
Connected:= false;
Provider:= 'SQLOLEDB.1';
Properties['Data Source'].Value:= '192.168.0.4'; //服务器名
Properties['Initial Catalog'].Value:= 'xxgl'; //表名
Properties['User ID'].Value:= 'sa'; //用户名
Properties['password'].Value:= '123'; //密码
LoginPrompt:= false;
try
Connected:= true;
except
begin
Application.MessageBox('无法连结远程数据库!','注意', MB_OK);
exit;
end;
end;
end;
finally end;
result:=true;
end;为什么会提示“无效的授权说明”呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货