2
This file is part of the Free Component Library (FCL)
3
Copyright (c) 1999-2000 by the Free Pascal development team
5
See the file COPYING.FPC, included in this distribution,
6
for details about the copyright.
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
**********************************************************************}
18
uses db,memds,classes,sysutils;
27
with TMemDataset.Create(Nil) do
32
Add('Boolean', ftBoolean, 0, False);
33
Add('Integer', ftInteger, 0, False);
34
Add('SmallInt', ftSmallInt, 0, False);
35
Add('Float', ftFloat, 0, False);
36
Add('String', ftString, 30, False);
37
Add('Time', ftTime, 0, False);
38
Add('Date', ftDate, 0, False);
47
FieldByName('Boolean').AsBoolean:=False;
48
FieldByName('Integer').AsInteger:=I;
49
FieldByName('SmallInt').AsInteger:=I;
50
FieldByName('Float').AsFloat:=I/10;
51
FieldByName('String').AsString:='Test-Data '+IntToStr(I);
52
FieldByName('Time').AsDateTime:=D;
53
FieldByName('Date').AsDateTime:=D;
61
Writeln('Record ',ACount,' : ');
62
Writeln('------------------------');
63
For I:=0 to Fields.Count-1 do
64
Writeln(Fields[I].FieldName,' : ',Fields[I].AsString);
68
Writeln('Total data size : ',DataSize);
69
If (ParamCount>0) then
70
FileName:=ParamStr(1);