I have an SQLite double field that is used to display a date. There is no default value for the field. I need the field value to be NULL when there is no date entered because when the field is displayed as a date, it shows '12/30/1899'. For some reason, I cannot set the field to NULL. I am using C++ Berlin 10.1. Here is the code:
FDQuery1->First();
while (!FDQuery1->Eof) {
if (!VarIsNull(FDQuery1->FieldByName("DateLeft")->Value))
if (FDQuery1->FieldByName("DateLeft")->Value < 100) {
FDQuery1->Edit();
FDQuery1->FieldByName("DateLeft")->Value = NULL;
FDQuery1->Post();
}
FDQuery1->Next();
}
"FDQuery1->FieldByName("DateLeft")->Value" is still 0 after running this code.
How can I set the value to NULL?