I have one database, that has one table: Customers.
This table has some fields. Example:
Code (AutoInc)
Name (Caracter)
Phone (Caracter)
I'm not using field or record validation. To do this, I just create triggers.
Here is an example:
Function Customers_Insert
_ErrorMsg = Iif(Empty(Code),"Invalid Code"+Chr(13),"")+;
Iif(Empty(Name),"Invalid Name"+Chr(13),"")
Return Empty(_ErrorMsg)
The variable _ErrorMsg is public... So, if the trigger failled, I just read its content and show it to the user. If both validations (code and name) has failled, I can show it to the user at the same time.
If I use fields validations, I will get just one message for each time I try to save my record in the table. I don't think it is produtive, so it is not good for me...
The question is: Any suggestion about technics to do it?
TIA!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte