F
fjx_jwf
Unregistered / Unconfirmed
GUEST, unregistred user!
我在应用程序服务器的adodataset1的Parameters中设置了四个参数para1,para2,para3,para4
然后在adodataset1.beforeopen事件中写下
with adodataset1do
begin
Close;
CommandText:='';
//if Parameters.ParamByName('para1').Value='sqlusername' then
//commandtext:='select username from F01username';
if Parameters.ParamByName('para1').Value='systempass' then
commandtext:=format('select dxdm,cxqxdm,xgqxdm,zjscqxdm,dyqxdm,qbqxdm from %s where (username='+'''%s'''+') and (password='+'''%s'''+')',[Parameters.ParamByName('para2').Value,trim(Parameters.ParamByName('para3').Value),trim(Parameters.ParamByName('para4').Value)]);
end;
客户端为:
with clientdataset1do
begin
close;
FetchParams;
Params.ParamByName('para1').AsString:='systempass';
Params.ParamByName('para2').AsString:=ftablename;
Params.ParamByName('para3').AsString:=fusername;
Params.parambyname('para4').AsString:=fpassword;
open;
end;
提示错误为adodataset1arameter 'para1'没有发现
怎么解决?
然后在adodataset1.beforeopen事件中写下
with adodataset1do
begin
Close;
CommandText:='';
//if Parameters.ParamByName('para1').Value='sqlusername' then
//commandtext:='select username from F01username';
if Parameters.ParamByName('para1').Value='systempass' then
commandtext:=format('select dxdm,cxqxdm,xgqxdm,zjscqxdm,dyqxdm,qbqxdm from %s where (username='+'''%s'''+') and (password='+'''%s'''+')',[Parameters.ParamByName('para2').Value,trim(Parameters.ParamByName('para3').Value),trim(Parameters.ParamByName('para4').Value)]);
end;
客户端为:
with clientdataset1do
begin
close;
FetchParams;
Params.ParamByName('para1').AsString:='systempass';
Params.ParamByName('para2').AsString:=ftablename;
Params.ParamByName('para3').AsString:=fusername;
Params.parambyname('para4').AsString:=fpassword;
open;
end;
提示错误为adodataset1arameter 'para1'没有发现
怎么解决?