#1 2019-01-24 07:03:32

delphi_911
Member
Registered: 2018-06-11
Posts: 31

TIMESTAMP field in MSSQLServer DB

Hi, everyone,
how to write a TSQLRecord class, there is a field, I need to Create a TIMESTAMP(DB Data type) field in MSSQLServer? (TUnixTime map to bigint)

Many thanks.

Last edited by delphi_911 (2019-01-24 07:12:52)

Offline

#2 2019-01-24 08:55:16

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

Re: TIMESTAMP field in MSSQLServer DB

See DB_FIELDS[] constant array in SynDB.pas.

So there is no way to create such a field.
If you define a TDateTime, it will create a datetime field.
The only way may be to create the table by hand, then use a TDateTime field in the ORM: depending on the SynDB provider, it should handle TIMESTAMP as expected.

Offline

Board footer

Powered by FluxBB