TSQLQuery | DataType | Json | PostgreSQL lazarus / 16-Databases ---------------------------------------------------------------------- cpalx · 2021-02-13 18:41 Hello i am using Lazarus 2.0.10 in Linux Ubuntu 20.04. does some body know how to detect if a field is a json data type? i use: Query.FieldDefs[ iRow ].DataType but i can not competere to any of ftSmallint, ftInteger, .... https://lazarus-ccr.sourceforge.io/docs/fcl/db/tfieldtype.html ---------------------------------------------------------------------- LacaK · 2021-03-02 10:50 There is no native JSOM TFieldType. Delphi also does not have such field type. Only way is map to ftBlob, ftMemo fields ... (at TSQLConnection level ... I do not know if it is implemented ATM or not) ---------------------------------------------------------------------- lucamar · 2021-03-02 14:25 Quote from: cpalx on February 13, 2021, 07:41:30 pmi use: Query.FieldDefs[ iRow ].DataType but i can not competere to any of ftSmallint, ftInteger, ... Are you sure you have the DB unit in your uses clause and that nothing else is interfering in the definition of TFieldType? Ctrl-clicking in DataType should lead you to where it's taking it from, or you could use a temporary: Code: [Select]var something: TFieldType;just to see from where it's taking it. ETA: Also, seeing your code might lead to better help ...