You are not logged in.
Hi AB,
i create TSQLRecord on my Mobile Device and don't Know how to set TTimeLog there. (No SynCommons.pas available )
Last edited by itSDS (2014-11-17 19:03:36)
Rad Studio 12.1 Santorini
Offline
If you use our SynCrossPlatformRest.pas unit, both TCreateTime / TModTime fields will be automatically set before being sent to the server.
You have nothing to do.
TSQLModelInfo.ComputeFieldsBeforeWrite() will do the work for you.
In fact, SynCrossPlatformRest.pas is some kind of cross-platform SynCommons.pas + mORMot.pas - for the client part only, of course.
See http://synopse.info/files/html/api-1.18 … mREST.html
You have TTimeLog functions in SynCrossPlatformRest.pas, to convert to/from a TDateTime, if you want to work with a TTimeLog field directly.
But you can also use a TDateTime for timestamp fields.
Offline
Hi AB you are right but there is a bug in the Wrapper code generating the Client Pas - Files.
The fields i defined on the Server where TCreateTime and TModTime, but the code generated by the Wrapper make them TTimeLog.
As Result the HasTimeFields in ComputeFieldsBeforeWrite is false and the Values are nil.
I modified the generated code to TCreateTime / TModTime by hand and it works !
Rad Studio 12.1 Santorini
Offline
Ticket created
Rad Studio 12.1 Santorini
Offline
Should be fixed by http://synopse.info/fossil/info/444b4c040f
Thanks for the feedback!
Offline
Very nice It works !
Rad Studio 12.1 Santorini
Offline