D7+SQL Server2000
用Adoquery控件,代码如下:
with qryKill do
begin
close;
sql.Clear;
sql.Text :='kill :a';
Parameters.ParamByName('a').Value:=qrySp.FieldByName('spid').AsInteger;
execsql;
end;
结果出错,但改成常数形式,即sql.Text:='kill 51';则能正常运行。
用Showmessage(inttostr(qrySp.FieldByName('spid').AsInteger))得到的值也为51。
请各位帮忙看看。
用Adoquery控件,代码如下:
with qryKill do
begin
close;
sql.Clear;
sql.Text :='kill :a';
Parameters.ParamByName('a').Value:=qrySp.FieldByName('spid').AsInteger;
execsql;
end;
结果出错,但改成常数形式,即sql.Text:='kill 51';则能正常运行。
用Showmessage(inttostr(qrySp.FieldByName('spid').AsInteger))得到的值也为51。
请各位帮忙看看。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货