主题:在delphi中使用update语句的问题
我定义了一过程:
procedure tfrm_memhk.modifyothertablekh(oldkh,newkh,table:string);
begin //oldkh:原卡,newhk:新卡;table:表名;
with datamodule1.q_other do
begin
close;
sql.Clear;
sql.Add('update '+trim(table));
sql.Add('set hykh='''+newkh+'''');
sql.Add('where hykh='''+oldkh+'''');
try
open;
except
execsql;
end;
end;
end;
提示错误:'query1 commandtext doesn't return a result value'
请问是怎么回事.该如何解决呢?谢谢大家的帮助!!!
procedure tfrm_memhk.modifyothertablekh(oldkh,newkh,table:string);
begin //oldkh:原卡,newhk:新卡;table:表名;
with datamodule1.q_other do
begin
close;
sql.Clear;
sql.Add('update '+trim(table));
sql.Add('set hykh='''+newkh+'''');
sql.Add('where hykh='''+oldkh+'''');
try
open;
except
execsql;
end;
end;
end;
提示错误:'query1 commandtext doesn't return a result value'
请问是怎么回事.该如何解决呢?谢谢大家的帮助!!!