unodgs Messages: 1366 Registered: November 2005 Location: Poland
Ultimate Contributor
Quote:
In other words how to prevent creating or altering records with duplicate value
I modified HomeBudget to be able to do that. It uses GridCtrl's CancelInsert/CancelUpdate in grid callbacks if database refuse commiting new/updated record. Now it shows sql error, but you can examine a sql error code and if it is index violation you can show "Error: duplicate record".