Handle violation on PostError event

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
lauchuen
Posts: 37
Joined: Fri 07 Aug 2009 16:59

Handle violation on PostError event

Post by lauchuen » Mon 06 Aug 2012 02:32

hi,
is that possible to trip when violation of duplicate key or foreign key constraint on PostError event ? or where should i handle this violation raise after DataSet.CommitUpdates;

thx.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Handle violation on PostError event

Post by AlexP » Mon 06 Aug 2012 12:04

hello,

At executing the Post method when the CachedUpdates mode is enabled, data is stored locally, and since the constraints check occurs on the server, then it's difficult to check the constraints on the client. For this, it is necessary to get all the data about the constraints of this table and compare by yourself the data inserted by a user with the existent constraints.

Post Reply