Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validate controls or fields
Message
 
À
12/06/2002 11:30:43
Irv Adams
MSC Managed Care, Inc.
Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00667196
Message ID:
00668150
Vues:
29
Thank you all for the good ideas!

>There have been a couple of good answers to your question already, and of course the answer is debateable, depending on your program's size, complexity, need for portability, etc.
>
>Just to allow another idea: you can Scatter/Gather (or assign in code) Table Field values to Object Properties, then bind the Properties to the Textboxes, etc. This creates a transaction layer that allows for easier transition to another Data Engine in the future (like SQL,Oracle, etc.)...
>
>Just my 2 cents...
>
>
>>Is there a recommended method to validating data on a form?
>>
>>Assuming the control is bound to a table field...
>>
>>Which is better?
>>
>>
>>if empty(table.field) then
>>  =messagebox('this field cannot be empty')
>>  return
>>endif
>>
>>
>>or
>>
>>
>>if empty(thisform.text1.value) then
>>  =messagebox('this field cannot be empty')
>>  return
>>endif
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform