Page 1 of 1

Handle violation on PostError event

Posted: Mon 06 Aug 2012 02:32
by lauchuen
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.

Re: Handle violation on PostError event

Posted: Mon 06 Aug 2012 12:04
by AlexP
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.