Has Lazarus acquired new ftXXX TFieldType values? lazarus / 16-Databases ---------------------------------------------------------------------- vfclists · 2024-02-20 00:13 When I look in Db I see TFieldType defined as Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   TFieldClass = class of TField;   // Data type for field.  // The order is determined by Delphi compatibility  TFieldType = (ftUnknown, ftString, ftSmallint, ftInteger, ftWord,    ftBoolean, ftFloat, ftCurrency, ftBCD, ftDate,  ftTime, ftDateTime,    ftBytes, ftVarBytes, ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo,    ftParadoxOle, ftDBaseOle, ftTypedBinary, ftCursor, ftFixedChar,    ftWideString, ftLargeint, ftADT, ftArray, ftReference,    ftDataSet, ftOraBlob, ftOraClob, ftVariant, ftInterface,    ftIDispatch, ftGuid, ftTimeStamp, ftFMTBcd, ftFixedWideChar, ftWideMemo);  I don't see any special field to specify a field which is Utf8 in the list of field types, so which is it likely to be ftString, ftWideString,ftMemo, ftWideMemo or what? How does the database library decide the TFieldType for a database text type? It is up to the library designer? ---------------------------------------------------------------------- JuhaManninen · 2024-02-20 06:56 Quote from: vfclists on February 20, 2024, 01:13:18 amI don't see any special field to specify a field which is Utf8 in the list of field types, so which is it likely to be ftString, ftWideString,ftMemo, ftWideMemo or what? It would be ftString. ---------------------------------------------------------------------- vfclists · 2024-02-20 09:18 Quote from: JuhaManninen on February 20, 2024, 07:56:25 amQuote from: vfclists on February 20, 2024, 01:13:18 amI don't see any special field to specify a field which is Utf8 in the list of field types, so which is it likely to be ftString, ftWideString,ftMemo, ftWideMemo or what? It would be ftString. Is this irrespective of length, even if it is a Postgres Text column? ---------------------------------------------------------------------- JuhaManninen · 2024-02-21 07:30 I don't know really. You must study the Postgres documentation. ---------------------------------------------------------------------- vfclists · 2024-02-21 08:33 Quote from: JuhaManninen on February 21, 2024, 08:30:46 amI don't know really. You must study the Postgres documentation. I suspect it may be down to the libraries used. It seems that Zeos treats any varchar column which doesn't specify a length as a text field and causes them all to show as (memo) in the controls. ---------------------------------------------------------------------- marcov · 2024-02-21 15:02 That's true, and that can be fixed using the ongettext So I have a function like this in my main datamodule Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TDataModuleBase.defaultGetText(Sender: TField; var Text: string;  DisplayText: Boolean);begin  if DisplayText then     Text := Copy(sender.AsString, 1, 50)  else     text:=sender.AsString;end;  and assign ongettext of every twidememofield to this function.