BioBytes Messages: 310 Registered: October 2008 Location: France
Senior Member
Hi papascalientes,
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.