Forum > Databases

Master Detail Single button for commit

(1/3) > >>

anis2505:
Hi all,

Simply I need to know how is it possible to commit all changes with single button click.

I have two SQLQuery components. and a 1 SQLTransaction. So I want to click a button and all data will be commited to database.

Sorry to bother. I don't have so many time to dig the forum.

regads
GH.Anis

LacaK:
SQLTransaction.Commit or SQLTransaction.CommitRetaining

anis2505:

--- Quote from: LacaK on November 26, 2015, 08:11:58 pm ---SQLTransaction.Commit or SQLTransaction.CommitRetaining

--- End quote ---

Hi thanks :)
My problem how to commit all SQLQuery component's updates.


--- Code: ---
//Master SQLQuery component
SQLMaster.ApplyUpdates;

// Detail SQLQuery component
SQLDetail.ApplyUpdates;

//Commit Updates
SQLTrasaction.Commit;


--- End code ---

The problem only the master's updates gets commited, the detail's updates gets are ignored

LacaK:
It should work.
Do you have on database side defined any referential integrity constraints ?
When you in same transaction close and open datasets data are there ?
(if not it means that they are not written to database...so it is primary not problem of commiting transaction, but applying updates)

kapibara:
Are you posting the detail changes before calling ApplyUpdates?

Navigation

[0] Message Index

[#] Next page

Go to full version