![]() |
Funktion die den Feldtyp als String zurückgibt
Liste der Anhänge anzeigen (Anzahl: 1)
Mit dieser einfachen, doch praktischen Funktion kann man den Feldtyp einer Datenbank als String zurückgeben.
Einfach mit ReturnTypFkt(ADOTable1.FieldByName('Feld1').FieldT ype) aufrufen
Delphi-Quellcode:
[edit=sakura]Unit-Code eingefügt. Damit jeder sieht, worum es geht. Mfg, sakura[/edit]
unit ReturnTyp;
interface uses db; function ReturnTypFkt(T : TFieldType):string; implementation function ReturnTypFkt(T : TFieldType):string; begin case T of ftString : Result := 'VarChar'; ftFloat : Result := 'Float'; ftCurrency : Result := 'Währungsfeld'; ftMemo : Result := 'Memo'; ftBlob : Result := 'Long'; ftDate : Result := 'Date'; ftDateTime : Result := 'Date/Time'; ftTime : Result := 'Time'; ftSmallInt : Result := 'SmallInt'; ftInteger : Result := 'Integer'; ftBoolean : Result := 'Boolean'; ftBytes : Result := 'Bytes'; ftWord : Result := 'Word'; ftTimeStamp : Result := 'TimeStamp'; ftVariant : Result := 'Variant'; ftBCD : Result := 'BCD'; ftVarBytes : Result := 'VarBytes'; ftAutoInc : Result := 'AutoInc'; ftGraphic : Result := 'Graphic'; ftFmtMemo : Result := 'FmtMemo'; ftParadoxOle : Result := 'ParadoxOle'; ftDBaseOle : Result := 'DBaseOle'; ftTypedBinary : Result := 'TypedBinary'; ftCursor : Result := 'Cursor'; ftFixedChar : Result := 'FixedChar'; ftWideString : Result := 'WideString'; ftLargeint : Result := 'Largeint'; ftADT : Result := 'ADT'; ftArray : Result := 'Array'; ftReference : Result := 'Reference'; ftDataSet : Result := 'DataSet'; ftOraBlob : Result := 'OraBlob'; ftOraClob : Result := 'OraClob'; ftInterface : Result := 'Interface'; ftIDispatch : Result := 'IDispatch'; ftGuid : Result := 'Guid'; ftFMTBcd : Result := 'FMTBcd'; else Result := 'unbekannt'; end; end; begin end. |
Re: Funktion die den Feldtyp als String zurückgibt
Du Fleißpelz :wink:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:50 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz