Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trying to update null value into tquery date field

2 views
Skip to first unread message

thomas...@hsweston.co.uk

unread,
Feb 9, 2007, 6:09:06 AM2/9/07
to
Hi All,

Program - CBuilder 6
database -Oracle

Im trying to update fields using a TQuery and one of them is a date
field, if I set the field to NULL then the database is filled with
30/12/1899.

Example Code :

sql = "update DEALERSHIP set";
sql += " DSH_CODE = :DSH_CODE";
sql += ", DSH_CONTACTNAME = :DSH_CONTACTNAME";
sql += ", DSH_CHECKEDDATE = :DSH_CHECKEDDATE";


query->ParamByName("DSH_CODE")->AsString = FCode;
query->ParamByName("DSH_CONTACTNAME")->AsString = FContactName;
query->ParamByName("DSH_FSACHECKEDDATE")->AsDateTime = NULL;

If I run the sql directly into the database the null value works as
the field shows blank.

How can I get the database to show the blank date using the code.

Many Thanks

0 new messages