I try to develop a small application with unidac, just for practice n experience. I make a data form with 5 button. in INSERT button on click I just write :
Code: Select all
UniTableMast.Insert;
Code: Select all
try
If not UniTrans1.InTransaction then
Unitrans1.StartTransaction;
UniTableMast.Post;
UniTableDet.Insert;
UniTableDet.Post;
If UniTrans1.InTransaction then
Unitrans1.Commit;
except
If UniTrans1.InTransaction then
Unitrans1.Rollback;
end;
Thank's very much for all your attention