Hi - I am trying to capture a Violation of Unique key constraint error. I am using delphi7, SDAC 2.45.1.20 02.07.03 and MS SQL2000. Could someone provide an example of how to trap this explicit error on the onpost event of a table
Cheers
OnPost Error trap for Violation of Unique Key Constraint
Try to write in MSQuery.PostError event handler something like this:
Code: Select all
if (E is EMSError) and (EMSError(E).ErrorCode = ...) then ...