views:

74

answers:

1

I would like to prevent scrolling of ADORecordset basing on some condition.

For example it would be convenient to do something like that:

procedure TfrmMain.qryCenyBeforeScroll(DataSet: TDataSet);
begin
  if not (condition) then
    qryCeny.DoNotScroll;  //Just the idea
end;

How to do this?

+4  A: 

You could raise an exception, for example:

if not (condition) then
  Abort;
TOndrej