views:

46

answers:

1

In a form we have several ado query(s) that hold connection to db.

In case the user hit the Save button, we want to save the data to the database. in case the user never asked to save a thing , we need to roll back the changes.

So concluded that a transaction should be in place.

For each change that is made, i save the table.

my question:

how do i know if one adoQuery is changed(say i have a dozen adoQuerys) and make the change saved? should a simple observer pattern solve this?

thanks i feel fuzzy myself as phrasing the question.

edit:

Imagine we have 10 adoQuery components. and we do insert/edit to them all. three of adoQuery recordSet has changed, now we want to decide ether to pass the change to the database or rollback the change, by user choice. how do we do it?