Mirek has given very good explanations as usual. Sure SqlArray can do some actions "magically" but cannot solve all your problems of errors that could happen in code. It is the way I go in my own applications.
The update, insert and delete operations are managed by SqlCtrls and generally, my application menu functions are written on the following basis:
void MainWin::DefineDevices()
{
SQL.Begin();
DevicesDlgWin.FillList();
//Initialization of ctrls in the dialog window
if(DevicesDlgWin.ExecuteOK())SQL.Commit();
else SQL.Rollback();
}
So if the user presses ok (validation) button, the transaction is committed. If cancel button is pressed, modifications are not recorded in database.
Biobytes
BTW, this a bad practice. You should not use transactions whose length depends on user GUI interaction. Transactions should be short.