function getchcount(query: TADOQuery): Integer;var i:integer;begin i:=0; with Query do begin Query.First; while not Eof do begin if Query.FieldByName('S_FLAG').AsBoolean then i:=i+1; next; end; end; Result:=i; //返回行数,integerend; procedure TXJBoxForm.…