We are trying to use OracleDictionary.EnforceConstraints and having a bit of trouble when interacting with our table from a grid. How do you catch these field check constraints when they occur? For that matter, how do you catch them at the record level. We tried implementing OnPostError for our TOracleDataSet descendant which gets called fine if EnforceConstraints is False. The code we tried;
begin
odsAL_Lane.Cancel;
Action := daRetry;
end;
This sort of works except we get a "Bug in InternalPost" message box. We have a message in TranslateMessage for our CHECK constraint that is being violated that only can be seen if running in the IDE. This is seen as the message portion of an EDatabaseError.
Back to Field level. TranslateMessage works the same there as well. After seeing the message in the IDE the application crashes.
What is the best, efficient, recommended way to work with constraints using the TOracleDataset, DOA, and Grids?
Tom Clowers
Systems Analyst/Programmer
ECMS - Technical Lead
Expeditors International of WA, Inc.
tom.clowers@expeditors.com
[This message has been edited by TomC (edited 25 May 2000).]
begin
odsAL_Lane.Cancel;
Action := daRetry;
end;
This sort of works except we get a "Bug in InternalPost" message box. We have a message in TranslateMessage for our CHECK constraint that is being violated that only can be seen if running in the IDE. This is seen as the message portion of an EDatabaseError.
Back to Field level. TranslateMessage works the same there as well. After seeing the message in the IDE the application crashes.
What is the best, efficient, recommended way to work with constraints using the TOracleDataset, DOA, and Grids?
Tom Clowers
Systems Analyst/Programmer
ECMS - Technical Lead
Expeditors International of WA, Inc.
tom.clowers@expeditors.com
[This message has been edited by TomC (edited 25 May 2000).]