Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Validation strategy
Message
From
15/05/2001 07:10:30
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Data Validation strategy
Miscellaneous
Thread ID:
00507191
Message ID:
00507191
Views:
49
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
Next
Reply
Map
View

Click here to load this message in the networking platform