I created a table:
Code: Select all
create table TSHEET_LOG (id integer primary key autoincrement not null, dtstart datetime, dtstop datetime, task nvarchar(30), subtask nvarchar(30), commentaire nvarchar(40));
create index idx_dt_tsheet on TSHEET_LOG (dtstart, dtstop);
Now I want to edit the table, using a TCRDBGrid, TUniDataSource and a TUniQuery. Fields were correctly added and recognized as datetimeFields. Updatequery generated seems fine:
Code: Select all
UPDATE tsheet_log
SET
TASK = :TASK,
COMMENTAIRE = :COMMENTAIRE,
SUBTASK = :SUBTASK,
DTSTART = :DTSTART,
DTSTOP = :DTSTOP
WHERE
ID = :OLD_ID
Setting a breakpoint in BeforePost event shows <field>->AsDateTime is filled in correctly with what I typed, but component seems unable to write it.
I tried to force dateformat property of the field to dd/mm/yyyy hh:nn:ss, no change.
I hope I can do something so the dateDime fields are updated correctly?