Wenn Du schon aune funktionierende
ADO-Abfrage hast, dann könntest Du hiermit die Feldtypen auslesen:
Delphi-Quellcode:
for i:=0
to q.Fieldcount-1
do begin
fname:=q.fields[i].Fieldname;
case q.Fields[i].Datatype
of
ftUnknown : Ftyp:='
Unknown or undetermined';
ftString : ftyp:='
Character or string field';
ftSmallint : ftyp:='
16-bit integer field ';
ftInteger : ftyp:='
32-bit integer field ';
ftWord : ftyp:='
16-bit unsigned integer field';
ftBoolean : ftyp:='
Boolean field ';
ftFloat : ftyp:='
Floating-point numeric field';
ftCurrency : ftyp:='
Money field ';
ftBCD : ftyp:='
Binary-Coded Decimal field';
ftDate : ftyp:='
Date field ';
ftTime : ftyp:='
Time field ';
ftDateTime : ftyp:='
lDate and time field ';
ftBytes : ftyp:='
Fixed number of bytes (binary storage)';
ftVarBytes : ftyp:='
Variable number of bytes (binary storage)';
ftAutoInc : ftyp:='
Auto-incrementing 32-bit integer counter field';
ftBlob : ftyp:='
Binary Large OBject field';
ftMemo : ftyp:='
Text memo field ';
ftGraphic : ftyp:='
Bitmap field ';
ftFmtMemo : ftyp:='
Formatted text memo field';
ftParadoxOle: ftyp:='
Paradox OLE field';
ftDBaseOle : ftyp:='
dBASE OLE field ';
ftTypedBinary:ftyp:='
Typed binary field';
ftCursor : ftyp:='
Output cursor from an Oracle stored procedure (TParam only)';
ftFixedChar : ftyp:='
Fixed character field ';
ftWideString: ftyp:='
Wide string field ';
ftLargeInt : ftyp:='
Large integer field ';
ftADT : ftyp:='
Abstract Data Type field';
ftArray : ftyp:='
Array field ';
ftReference : ftyp:='
REF field ';
ftDataSet : ftyp:='
DataSet field ';
ftOraBlob : ftyp:='
BLOB fields in Oracle 8 tables';
ftOraClob : ftyp:='
CLOB fields in Oracle 8 tables ';
ftVariant : ftyp:='
Data of unknown or undetermined type';
ftInterface : ftyp:='
References to interfaces (IUnknown)';
ftIDispatch : ftyp:='
References to IDispatch interfaces ';
ftGuid : ftyp:='
globally unique identifier (GUID) values ';
else ftyp:='
!not known!';
end;
{case---------------------------------}
Gruß
K-H