Simulating ApplyUpdate
Posted: Mon 14 Jan 2013 12:17
Hello,
I am developing a TForm with a number of PGTables and PGQueries in it. All of them are linked to each other via master/detail.
As I want to update all these PGTables+PGQueries at the same time, they all have CachedUpdated=True and LocalMasterDetails=True.
All these tables have constrains set on PostgreSQL DB on the server. As soon as I fire PGTable.ApplyUpdate the records will be saved in the DB and if there is an exception then it will be raised in Delphi. My application will manage these exceptions.
For some reasons I want to check if the data in the records the user amends/adds/cancels is consistent with the constrain rules BEFORE firing ApplyUpdate and I was wondering if there a way to simulate an ApplyUpdate so that I can have an exception I can manage before the real ApplyUpdate is activated.
Many thanks
Pio Pio
I am developing a TForm with a number of PGTables and PGQueries in it. All of them are linked to each other via master/detail.
As I want to update all these PGTables+PGQueries at the same time, they all have CachedUpdated=True and LocalMasterDetails=True.
All these tables have constrains set on PostgreSQL DB on the server. As soon as I fire PGTable.ApplyUpdate the records will be saved in the DB and if there is an exception then it will be raised in Delphi. My application will manage these exceptions.
For some reasons I want to check if the data in the records the user amends/adds/cancels is consistent with the constrain rules BEFORE firing ApplyUpdate and I was wondering if there a way to simulate an ApplyUpdate so that I can have an exception I can manage before the real ApplyUpdate is activated.
Many thanks
Pio Pio