Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid date/datetime values in specific situation
Message
De
28/12/2001 11:41:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00598441
Message ID:
00598831
Vues:
23
>>Perhaps you should store dates in numeric fields, or something similar, if you need to go back in time that much.
>
>Hilmar,
>
>It's not so much that we need to go back in time. It's that if a user is entering a date and enters a weird date by mistake, we just don't want the program to crash with a program error when it never used to do such. :)
>
>Laterness,
>Jon

OK; then, some ideas for error trapping.

1) Use an error trap (ON ERROR). Perhaps in TextBox.Valid().

2) Validate input in the date-textbox base-class. Perhaps with InteractiveChange().

3) Set up your global error-handler to ignore the error message that has the specified error number.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform