Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Validation strategy
Message
De
15/05/2001 07:10:30
David Gibson
Beacons Software
Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Data Validation strategy
Divers
Thread ID:
00507191
Message ID:
00507191
Vues:
48
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
Fil
Voir

Click here to load this message in the networking platform