if IBQuery2.UpdatesPending then IBQuery2.ApplyUpdates
if IBQuery2.UpdatesPending then IBQuery2.ApplyUpdates;