2

I got this form;

enter image description here

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?

TLama
  • 75,147
  • 17
  • 214
  • 392
Daan Kleijngeld
  • 1,375
  • 2
  • 10
  • 13
  • "Is there somebody who can help me out?" a rather poor question. http://www.catb.org/esr/faqs/smart-questions.html#prune – Arioch 'The Nov 07 '13 at 13:39

1 Answers1

5

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;
kobik
  • 21,001
  • 4
  • 61
  • 121