Re:How to show TField.DataSize and Tfield.DataType???
{
type TFieldType = (ftUnknown, ftString, ftSmallint, ftInteger, ftWord,
ftBoolean, ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, ftBytes,
ftVarBytes, ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle,
ftDBaseOle, ftTypedBinary, ftCursor);
var Tp:String;
with StringGrid1, Form1.Table1.Fields[i] do
begin
case datatype of
ftString:Cells[1,i]:='String';
ftInteger:Cells[1,i]:='Integer';
ftBoolean:Cells[1,i]:='Boolean'
{and so on......}
end;
Cells[2,i]:=inttostr(Datasize);
end;
Quote
Ganesan wrote in message <01bce5e8$4ca84200$0d00a8c0@ganespc>...
> t := Form1.Table1.Fields[i].DataType;
> StringGrid1.Cells[1,i] := (t)asString;
> w.AsString := Form1.Table1.Fields[i].DataSize;
> StringGrid1.Cells[2,i+1] := Form1.Table1.Fields[i].DataSize;
> StringGrid1.Cells[2,i+1] := w.AsString;