Is it true that cachedupdates only will work dataaware comp. and using Insert, edit, Post e.t.c.
I would like to the user a change to confirm all inserts and updates at one time.
If i use InsertSql and apply() i dont get the possibility to use ROLLBACK and CANCELUPDATES
MyUpdateSql1.InsertSQL.Text := 'INSERT INTO sejler (Status, Navn) '+
' VALUES ('+'''Lejer'''+', '+'''Julemanden'''+')';
will insert a new record, but its not possible to cancel or rollback
Tumbe
Insert, Update Sql
MyDAC provides similar, TDataSet compatible, interface for both developers and data-aware controls. So you can do something like this in your code (CachedUpdates is set to False):
Code: Select all
MyConnection.StartTransaction;
try
// do some changes using Insert, Edit, Post, Delete methods of a TDataSet decendant component
MyConnection.Commit; // apply changes
except
MyConnection.Rollback; // discard changes
end;