Subject More Scroll Questions...
Author Eric Handbury

I have a Customer-BeforeScroll event which closes all datasets
opened during the displaying of the previous Customer. It could close
dozens of datasets depending on the Tabs that the user has displaying.

My problem is as follows:
1) User goes to a particular Customer Tab which opens a couple of
2) User edits some field which sets qrCustomer->State to dssEdit.
3) Users says Ooops, and hits the Cancel button which generates a
4) IBO generates the following call-stack:

004371B9 TFileDM::CloseCustQueries(this=:01524C98)
00438B13 TFileDM::qrCustomerBeforeScroll(this=:01524C98,
005AEF59 Ib_components::LaunchDSEvent(DS=:01743A24, EV=
005AF152 Ib_components::TIB_Dataset::DoBeforeScroll(Self=:01743A24)
005AEA60 Ib_components::TIB_Dataset::SysBeforeScroll(Self=:01743A24)
005B52F7 Ib_components::TIB_BDataset::SysBeforeScroll(Self=:01743A24)
005A73CF Ib_components::TIB_Dataset::SysRefresh(Self=:01743A24,
Rows=true, Keys=true)
005A6C6C Ib_components::TIB_Dataset::RefreshAll(Self=:01743A24)
005A6C05 Ib_components::TIB_Dataset::Refresh(Self=:01743A24)
00595C82 Ib_components::TIB_Transaction::API_RollbackRetaining
00594482 Ib_components::TIB_Transaction::SysRollbackRetaining
005930DB Ib_components::TIB_Transaction::RollbackRetaining
00414C93 TFileForm::CancelBtnClick(this=:017730C8, Sender=:01C5EEC0)

5) My BeforeScroll event then closes all datasets thinking that the
Customer has changed, but in reality, the Customer has not changed
but only the State has changed (from dssEdit to dssBrowse).

6) Consequently, the user hits the Cancel button and all his
Customer data has disappeared. (due to my BeforeScroll event closing
all the datasets).

Therefore, I would like IBO to NOT call the Scroll events if there
is a Rollback on a Edit. I can understand a Scroll on a Insert or
Delete where the rows in the Dataset have indeed changed... but not
on a Edit. IBO may have to re-fill the buffer with the correct data
for that row, but it hasn't Scrolled.