Hey Doug,
>Does anyone know of a way to id which field actually failed the field validation.
>
>Example: Doing an insert into a table that has 5 fields. Each field has a field validation rule. If one of the fields fail its validation, is there some way of knowing which field actually failed besides the returned error message. I need to be able to log the failure and move on to the next record.
How about checking each field's validation rule BEFORE you try to commit the update using DBGETPROP()?
FOR i = 1 TO FCOUNT()
lcRule = DBGETPROP(ALIAS()+".FIELD[i]","FIELD","RuleText")
IF !EMPTY(lcRule)
IF !(lcRule)
Log Problem field information here!!!
ENDIF
ENDIF
ENDFOR
Or something very similiar to the above.
HTH,
Jim Duffy
Microsoft MVP
INETA Speaker
TakeNote TechnologiesDeveloper's Choice Award Winner for Best Training Company
Specializing in VB.NET, ASP.NET, VFP, and SQL Server Training and Development