Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Empty Datetime from MySQL and VFP table -- Mismatch
Message
De
24/06/2005 15:11:57
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Empty Datetime from MySQL and VFP table -- Mismatch
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
SAMBA Server
Database:
MySQL
Divers
Thread ID:
01026419
Message ID:
01026419
Vues:
94
I am writing a program to compare data between a MySQL and FoxPro table. Both tables have same structure. I pull all data from MySQL table in a cursor and compare all records and fields of the cursor with the corresponding fields/records of the FoxPro table.

One of the field (PROCDT) is of datatime. Some of the records have empty value in this field in MySQL as well as FoxPro table. The data retrieved from MySQL table shows type T and displays empty value (something like " . . : : "). The corresponding data in the FoxPro table has empty Datetime and displays similar empty data. However, when I compare the two, it evaluates to .F.
? SQLResult.ProcDT 
    .  .     :  :
? IOL_ACT.ProcDT 
    .  .     :  :
? VarType(SQLResult.ProcDT) 
T
? VarType( IOL_ACT.ProcDT) 
T
?SQLResult.ProcDT =IOL_ACT.ProcDT
.F.

* If I convert DateTime through TTOC, they match! 
? TTOC(SQLResult.ProcDT) = TTOC(IOL_ACT.ProcDT)
.T.
Has anyone seen this behaviour? Is this a bug?

Thank you so much...
- Ravi Taxali
Visual FoxPro Made Simple An excellent book for beginners as well as experienced programmers
Never Forget Again. Setup Email Reminders.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform