[SOLVED] Tdbf : how to know the fields type lazarus / 16-Databases ---------------------------------------------------------------------- arwen · 2007-07-10 10:02 When with a Tdbf object I open a table how I can know the type of a field knowing it's name ? In other words : I open table X and I know that it contains a field Z as I can know that type of field is Z (integer, date...)? Thanks to all !! ---------------------------------------------------------------------- arwen · 2007-07-10 12:18 That's the solution : Code: [Select] if DBf1.Fields.FieldByName(FiledName).DataType = ftDate then   begin        // do something if the field is a date type   end; The other type is all the ft.. type valid for the table level Quote     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 In this mode I can know at run time the field type .  :idea: