I got this form;
I want to save al of those edits with 1 save button. But the problem is that those fields all have a different datasource. Is there somebody who can help me out?
I got this form;
I want to save al of those edits with 1 save button. But the problem is that those fields all have a different datasource. Is there somebody who can help me out?
Simple go over all data sources involved and use DataSource.DataSet.Post
(assuming the DataSets are already in dsEdit
/dsInsert
mode).
Note: If your DBMS supports transactions, it would be wise to group all your posts in a single transaction, so that data/relations integrity will not be compromised e.g.:
MyConnObj.BeginTrans;
try
DataSource1.DataSet.Post;
DataSource2.DataSet.Post;
DataSource3.DataSet.Post;
MyConnObj.CommitTrans;
except
MyConnObj.RollbackTrans;
raise;
end;