Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty Datetime from MySQL and VFP table -- Mismatch
Message
From
24/06/2005 15:11:57
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Empty Datetime from MySQL and VFP table -- Mismatch
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
SAMBA Server
Database:
MySQL
Miscellaneous
Thread ID:
01026419
Message ID:
01026419
Views:
96
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.
Next
Reply
Map
View

Click here to load this message in the networking platform