Updates made to detail dataset are vanished when the master dataset record moves lazarus / 16-Databases ---------------------------------------------------------------------- salah · 2019-12-30 08:53 Hi guys I'am working on simple project of master/detail dataset using TSQLQuery of SQLDB (Lazarus 2.0.6, Firebird 3, Windows 7 32 bit), and here is my problem: All updates made to detail dataset are vanished whenever the master dataset active record moves! I think this is because the detail dataset is refreshed, but the option sqoCancelUpdatesOnRefresh is set to false Changes in the detail dataset are kept if I call ApplyUpdates method, but I don't want to apply update every time I scroll in the master dataset! Can anyone find a solution? Thanks ---------------------------------------------------------------------- devEric69 · 2019-12-30 09:00 For your information, afaik, you must absolutely POST the changes (insert \edit \delete) of the detail record(s), before you POST the master record! ---------------------------------------------------------------------- nouzi · 2019-12-30 09:55 @salah welcome see this first https://www.youtube.com/channel/UCaZ7RZJa4il7gL2v-jGHa8Q/playlists --------- you can use zeosdb package ---------------------------------------------------------------------- salah · 2019-12-30 10:34 Quote from: nouzi on December 30, 2019, 10:55:59 am@salah welcome see this first https://www.youtube.com/channel/UCaZ7RZJa4il7gL2v-jGHa8Q/playlists --------- you can use zeosdb package i found it very useful, thanks ---------------------------------------------------------------------- devEric69 · 2019-12-30 10:49 Quote[snip]...Firebird 3...[snip] Zeos are good components (I use them with MariaDb).. But, amho, IBX components are much more adapted to Firebird's features and technical specifications (I use IBX wth Firebird): TIBDataset handles the master details very well, and TIBQuery can be used for LookupDataset. You can do some research on the forum, and you will see that IBX is often used with Firebird. ---------------------------------------------------------------------- salah · 2019-12-30 11:01 Quote from: devEric69 on December 30, 2019, 11:49:37 amQuote[snip]...Firebird 3...[snip] Zeos are good components (I use them with MariaDb).. But, amho, IBX components are much more adapted to Firebird's features and technical specifications (I use IBX wth Firebird): TIBDataset handles the master details very well, and TIBQuery can be used for LookupDataset. You can do some research on the forum, and you will see that IBX is often used with Firebird. Thank you for your fast reply, I will try to use IBX. ---------------------------------------------------------------------- devEric69 · 2019-12-30 13:03 QuoteThank you for your fast reply, I will try to use IBX. As a reminder, in Master-Details with IBX, the trick not to forget is to add in the TIBdetails.SelectSQL (Cf. the comments /* ... */) a WHERE clause like that: Code: MySQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SELECT ...FROMDetails A/* add here, a WHERE statement, to fetch the master key value, through its TIBXdetails.DataSource property */WHERE A.MASTER_ID = :MASTER_ID /* add eventually, another ORDER BY statement, if needed */ORDER BY ...