Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CA- Date make Null
Message
 
À
24/06/2007 12:46:11
Aman Bains
Jaguar Computers
Jalandhar, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
MS SQL Server
Divers
Thread ID:
01235248
Message ID:
01235251
Vues:
19
This message has been marked as the solution to the initial question of the thread.
>I am using CA for Insert/Update. I want to make the date fields NULL if user deletes a date. Can it be done without having to check each date field individually?

Yes,
Create a method in your CA base class, call it NullDate or whatever you want it as a name. In it put:
LPARAMETERS ldDatetime
RETURN IIF(EMPTY(ldDatetime), NULL, ldDatetime)
Then you must set ConversionFunc property of the CA for all Date or DateTime fields:
this.ConversionFunc = [DateField this.NullDate, DateTimeField this.NullDate]
that is all :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform