代码如下,老提示 ... Parameter 'wdbh' not find ...,表里实际是有的,查询出来有一条记录也显示在DBGrid表里出错在哪???? with f_tjhz do
begin
sqaddr_sql.close();
sqaddr_sql.SQL.Clear;
sqaddr_sql.SQL.Add('select * from oper where jb=:jb and bh=:bh');
sqaddr_sql.Parameters.ParamByName('jb').value:=JB_user;//JB_user已经定义的全局变量
sqaddr_sql.Parameters.ParamByName('bh').value:=BH_user;//BH_user已经定义的全局变量
sqaddr_sql.Active:=true;
sqaddr_sql.open;
f_tjhz.Edit1.Text:=trim(Parameters.ParamByName('wdbh').value);------->字段wdbh实际存在
end;
begin
sqaddr_sql.close();
sqaddr_sql.SQL.Clear;
sqaddr_sql.SQL.Add('select * from oper where jb=:jb and bh=:bh');
sqaddr_sql.Parameters.ParamByName('jb').value:=JB_user;//JB_user已经定义的全局变量
sqaddr_sql.Parameters.ParamByName('bh').value:=BH_user;//BH_user已经定义的全局变量
sqaddr_sql.Active:=true;
sqaddr_sql.open;
f_tjhz.Edit1.Text:=trim(Parameters.ParamByName('wdbh').value);------->字段wdbh实际存在
end;
begin
close();
SQL.Clear;
SQL.Add('select * from oper where jb=:jb and bh=:bh');
Parameters.ParamByName('jb').value:=JB_user;
Parameters.ParamByName('bh').value:=BH_user;
open;
Edit1.Text:=trim(fieldbyname('wdbh').asString);
end;