Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to configure cursoradapter to convert null date to empty
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
How to configure cursoradapter to convert null date to empty
Divers
Thread ID:
00981128
Message ID:
00981128
Vues:
104
In SQL Server there is no such thing as empty date. This fact is a base of one of the main problems while upsizing existing VFP application.

In VFP9 sending empty date as null date to SQL Server is quite easy using .ConversionFunc property of an cursoradapter and a user defined function say ConvertEmptyDateTonull().
In opposite direction (sending SQLServer null date as empty date to VFP cursor) it is not as easy. I should rather say it is still easy but it is not so elegant.
My way is using in aftercursorrefresh and aftercursorfill method such steps:
- set .sendupdates to .f.
- update null dates with empty dates
- TABLEUPDATE(,,)
- set .sendupdates to .T.
The way is quite easy - but I did not like it mainly because updating takes time especially when there is many null/empty dates and many date fields in a table.
I still wonder if is there a smarter/quicker/better way - it should be.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform