我要在遍历中重复 使用这个回调函数 但是在回调函数运行中 第2次遍历时候在位置1 把这个查询给关闭了
造成地址冲突 有好的解决办法没有 DataSource2.DataSet:=PrintOne_Qy;
while not Printer_qy.Eof do //线程内的一个循环
begin
PrintOne_Qy.Close; //位置1
PrintOne_Qy.SQL.Clear;
PrintOne_Qy.sql.add('select * from billitem b where b.Account=:Account ');
PrintOne_Qy.Parameters.ParamByName('Account').value:=Account;
PrintOne_Qy.Open;
if PrintOne_Qy.RecordCount>0 then
begin
PCallBack(DataSource2,Trim(Printer_qy.FieldByName('Printer').AsString),'One'); //回调函数
end;
Printer_qy.Next;
end;
造成地址冲突 有好的解决办法没有 DataSource2.DataSet:=PrintOne_Qy;
while not Printer_qy.Eof do //线程内的一个循环
begin
PrintOne_Qy.Close; //位置1
PrintOne_Qy.SQL.Clear;
PrintOne_Qy.sql.add('select * from billitem b where b.Account=:Account ');
PrintOne_Qy.Parameters.ParamByName('Account').value:=Account;
PrintOne_Qy.Open;
if PrintOne_Qy.RecordCount>0 then
begin
PCallBack(DataSource2,Trim(Printer_qy.FieldByName('Printer').AsString),'One'); //回调函数
end;
Printer_qy.Next;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货