#1 2012-09-04 14:06:46

VojkoCendak
Member
From: Celje Slovenia
Registered: 2012-09-02
Posts: 93

SQLite3 DB TModTime problem

(Delphi 2009 ent)
We found that when we Save to db field TModTime with Iso8601FromDateTime(Now+OneSec),actual seconds do not increment in db field. It's kind of constant ?
And reverse Iso8601ToDateTime is not working. I mean DateTime is not equal.

thank you,
Vojko

Offline

#2 2012-09-04 15:31:25

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: SQLite3 DB TModTime problem

As stated by the documentation, TModTime fields are re-computed on the fly by the ORM before sending the updated CRUD request to the server.

So the values you put manually in TModTime will be overriden on the client side.

If you want to set a special value, do not use a TModTime field, but a basic TTimeLog kind of property.
You may also use low-level SQL to do it, but it is a hack, not ORM friendly.

Offline

Board footer

Powered by FluxBB