If I give a NOT NULL DATE field a DEFAULT value of '9999-12-31' and assign it a NULL value in BCB6 it ends up with a value of '1899-12-30'.
I fare no better in the MySQL Query Browser as after assigning it a NULL value in that it ends up with a value of '0000-00-00'.
Anyone cast any light on this?
Using MySQL 5.0.27
MyDac 5.00.0.1
Date Default values
Try to use the Clear() method instead of assigning the NULL value:
Code: Select all
MyQuery1->FieldByName("Date_field")->Clear();-
NoComprende
- Posts: 135
- Joined: Tue 09 Jan 2007 13:44
I tested this issue withe following filed definition on the last MyDAC version (5.00.1.6):
and the following code:
I see in the server log that the following command is sent:
Try to download the last MyDAC. I the problem persists, specify your code, and table definition.
Code: Select all
`HIREDATE` date NOT NULL default '9999-12-31',Code: Select all
MyQuery1->Open();
MyQuery1->Edit();
MyQuery1->FieldByName("HireDate")->Clear();
MyQuery1->Post();Code: Select all
UPDATE emp
SET
HIREDATE = NULL
WHERE
EMPNO = 1