Hi Folks
A colleague is using Java with a driver supplied by HXTT to insert data into my foxpro database. Almost everything works fine, except a single process where an insert adds some NULL entries that do not behave in a consistent manner.
The data looks visually OK when I browse the table, but some other code fails to read the data and I've resolved a test that identifies the 'broken' records:
SELECT * FROM cmsmsg ;
WHERE ISNULL(clsendid) ;
INTO CURSOR curGoodNulls
SELECT * FROM cmsmsg ;
WHERE ISNULL(clsendid) == .T. ;
INTO CURSOR curAllNulls
SELECT * ;
FROM curAllNulls ;
WHERE cmsmsgid NOT in ;
(SELECT cmsmsgid FROM curGoodNulls) ;
INTO CURSOR curBadNulls
Of course curBadNulls should be empty - but it isn't! I can fix the broken records in vfp with an update/replace setting the NULLed fields to '' and then resetting to .NULL. (NB: just setting straight to NULL doesn't fix it).
I am assuming the issue is related to a fault with the driver, but I can see this could be a long slow investigation. Has anyone seen this before, or has anyone an insight into how a NULL could behave in this way? I've not seen it before in 12yrs using Foxpro...
Thanks for any help/info you can give
Regards
Graham
A colleague is using Java with a driver supplied by HXTT to insert data into my foxpro database. Almost everything works fine, except a single process where an insert adds some NULL entries that do not behave in a consistent manner.
The data looks visually OK when I browse the table, but some other code fails to read the data and I've resolved a test that identifies the 'broken' records:
SELECT * FROM cmsmsg ;
WHERE ISNULL(clsendid) ;
INTO CURSOR curGoodNulls
SELECT * FROM cmsmsg ;
WHERE ISNULL(clsendid) == .T. ;
INTO CURSOR curAllNulls
SELECT * ;
FROM curAllNulls ;
WHERE cmsmsgid NOT in ;
(SELECT cmsmsgid FROM curGoodNulls) ;
INTO CURSOR curBadNulls
Of course curBadNulls should be empty - but it isn't! I can fix the broken records in vfp with an update/replace setting the NULLed fields to '' and then resetting to .NULL. (NB: just setting straight to NULL doesn't fix it).
I am assuming the issue is related to a fault with the driver, but I can see this could be a long slow investigation. Has anyone seen this before, or has anyone an insight into how a NULL could behave in this way? I've not seen it before in 12yrs using Foxpro...
Thanks for any help/info you can give
Regards
Graham