begin
// del.dataset.Edit;
del.DataSet.Delete;
// del.DataSet.Post;
del.DataSet.ApplyUpdates;
end;
del.DataSet.Next;
end;
dsb_js.dataset.Next;
end;
// del.DataSet.ApplyUpdates;
query1.Close;
query1.CommandText := 'SELECT DZWJJSBMSJB.id, DZWJJSBMSJB.BBH,DZWJJSBMSJB.JSWJBH, DZWJJSBMSJB.JSGW, DZWJJSBMSJB.WJNR, DZWJJSBMSJB.WJMC, DZWJJSBMSJB.JSR, DZWJJSBMSJB.ZT, DZWJJSBMSJB.DL, DZWJJSBMSJB.ZL from DZWJJSBMSJB,(select max(DZWJJSBMSJB.BBH) as BBH,jswjbh from DZWJJSBMSJB group by jswjbh) t where DZWJJSBMSJB.BBH = t.BBH and DZWJJSBMSJB.jswjbh= t.jswjbh and DZWJJSBMSJB.ZT = ''发放'' and DZWJJSBMSJB.jswjbh = '''+jsbh+''' ';
query1.Open;
dialogs.ShowMessage(sysutils.IntToStr(query1.RecordCount));
数量还是2条,应该是一条, |