>I'm using a VFP8SP1 database. It contains a table in which I've put a three field validations that calls the same stored procedure (ie. the same stored procedure is called from three fields). Is it possible to prevent that validation from firing when I update any of the three field values?
>
>Why would I want to do that?
>
>Well, I put the validation in to ensure business rules are enforced when users open and browse the table in VFP. At runtime, though, I have a form that allows "batch processing" which updates the fields using a replace command. The stored procedure takes a second or two to run which is acceptable when browsing, however, if called via a replace all command, those seconds quickly add up and then it becomes "too long" to wait.
>
>So I was hoping that there could be a SET FIELDVALIDATION OFF before I do a replace all command then I could SET FIELDVALIDATION ON after. I couldn't find one :(
>
>Does anyone have any suggestions, ideas or comments?
>
>TIA
>
>Mike
Mike,
Your field validation rule(s) could check for the presence of a variable
eg
private SomeLongVariableNameForTable_FieldRule
SomeLongVariableNameForTable_FieldRule = TRUE
replace Field1 with aValue in Table all
do case
case (type('SomeLongVariableNameForTable_FieldRule') = T_LOGICAL) and SomeLongVariableNameForTable_FieldRule
otherwise
endcase
Gregory