Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Blank values update to null
Message
De
18/12/2004 11:52:51
 
 
À
17/12/2004 00:06:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
00969931
Message ID:
00970323
Vues:
22
Hello,

you can use the ConversionFunc property of the CursorAdapter.

e.g.

DEFINE CLASS yourCA AS yourCABaseClass
SelectCmd = "SELECT someField, someDate FROM someTable WHERE ..."
ConversionFunc = "someDate SQLDateFix"
.. other properties ..
ENDDEFINE


FUNCTION SQLDateFix(ldDate)
RETURN IIF(EMPTY(ldDate),.NULL.,ldDate)
ENDFUNC


this way you don't have to fiddle with this stuff in the user interface and keep the code where it really belong's to (the data layer)

Regards
Christian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform