Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
type
DataRecord = Record
Level : byte;
FileName : string[80];
HelpString : string[20];
end;
var
RetrieveFM: TRetrieveFM;
FileDir: string;
XRec: DataRecord;
DataFile : File of DataRecord;
implementation
{$R *.dfm}
procedure TRetrieveFM.Button1Click(Sender: TObject);
begin
FileDir := ExtractFilePath(Application.ExeName) + 'List.dta';
AssignFile(DataFile, FileDir);
{$I-} Reset(dataFile); {$I+}
if IOResult <> 0 then Application.Terminate;
if table1.IsEmpty then //mount table
begin
Table1.DisableControls;
while not EOF(DataFile) do
begin
Read(Datafile,XRec);
Table1.Insert;
Table1.FieldByName('FileName').AsString := xRec.FileName;
Table1.FieldByName('HelpString').AsString := xRec.HelpString;
Table1.FieldByName('Level').AsInteger := xRec.Level;
Table1.Post;
end;
CloseFile(DataFile);
Table1.EnableControls;
end;
end;