Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: FireDAC handling milliseconds in TSQLTimeStamp and TDateTime fields


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 0 Threads: [ Previous | Next ]
Beratungs und F...

Posts: 1
Registered: 11/29/13
FireDAC handling milliseconds in TSQLTimeStamp and TDateTime fields  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 23, 2018 4:43 AM
(MariaDB 10.1.13, InnoDB, Delphi 10 Seattle)

Hello there,

we have a timestamp field in every table of our database, which update themselves automatically.
Create Code looks like this:
(...`LastCh` TIMESTAMP(2) NOT NULL DEFAULT CURRENT_TIMESTAMP,...)

As you can see, the timestamp field has a precision of 2, which indicates the number of digits for milliseconds.
In Delphi, the associated field in the FDQuery has the exact same settings (TSQLTimeStampField) like it would be without the precision of 2.

Now when i want to open that table via ".active := true" or ".open('')", an error occurs in the FireDAC layer, apparently having issues converting the timestamp field.

Error: Message: [FireDAC][Stan]-43. Value [00 ??] is out of range of datatype [Cardinal]. (Translated form german)

In the field properties of the TSQLTimeStamp field from the FDQuery, i didn't found anything that has to do with milliseconds, neither in the FormatOptions of the FDQuery.

What are we doing wrong? Is there even a way to fetch DateTime values that have milliseconds in FireDAC?

Thanks for your help.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02