Information générale
Titre:
Data Validation strategy
Is there any way of determining which field caused a record level validation to fail?
I'm trying to altering my data validation strategy. Up until now I have used a form method to check everything when the user chooses to Save. I would like to replace this with a database stored procedure.
I have moved my validating code to a stored procedure which is called from the record validation rule of the table, and this does get run successfully when I issue TableUpdate() in the form.
The problem I'm having is in creating the same friendly type of user interface that my users know and expect. Assuming the data failed to validate, the form knows that the TableUpdate() has failed because it returned false, but the form also needs to know why it failed and in particular which field it failed on so it can SetFocus() to the offending field.
I know I can use AERROR() but it always returns the same information - 1583 Record validation rule is violated.
In case anyone is thinking of suggesting it - using field level validations and doing the validation on a field by field basis would not be an acceptable solution.
Many thanks for your suggestions - and if I'm going about this in completely the wrong way please point me to some documentation showing how it should be done <g>.
David
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement