home *** CD-ROM | disk | FTP | other *** search
- program DB_Xpl18;
- uses
- CRT,
- DOS,
- GS_Winfc,
- GS_dBFld,
- GS_dBase;
-
- type
- Talk_Obj = object(GS_dBFld_Objt)
- constructor Init(FName : string);
- procedure StatusUpdate(statword1,statword2,
- statword3 : longint); virtual;
- end;
-
- var
- Health : Talk_Obj;
- TalkWin : GS_Wind_Objt;
-
-
- constructor Talk_Obj.Init(FName : string);
- begin
- GS_dBFld_Objt.Init(FName);
- TalkWin.InitWin(10,10,70,15,Blue,LightGray,Yellow,LightGray,Black,true,
- '',true);
- end;
-
- procedure Talk_Obj.StatusUpdate(statword1,statword2,statword3 : longint);
- begin
- case statword1 of
- StatusStart : begin
- case statword2 of
- StatusPack : TalkWin.NamWin('[ Pack Progress ]');
- StatusIndexTo : TalkWin.NamWin
- ('[ Index Progress ]');
- end;
- TalkWin.SetWin;
- GotoXY(26,3);
- write('Total Records to Process = ',statword3);
- end;
- StatusStop : begin
- TalkWin.RelWin;
- end;
- StatusPack,
- StatusIndexTo : begin
- GoToXy(2,3);
- write('Record Number ',statword2,' ');
- end;
- end;
- end;
-
- begin
- ClrScr;
- Health.Init('HEALTH');
- Health.Open;
- Health.IndexTo('FOODCODE','FOOD_CODE');
- {Create an index. Use field FOOD_CODE}
- {and create a .NDX file named FOODCODE}
- Health.Index('FOODCODE'); {Use Index FOODCODE.NDX}
- Health.GetRec(Top_Record);
- while not Health.File_EOF do
- begin
- writeln(Health.FieldGet('FOOD'),' ',
- Health.FieldGet('CALS'),' (',
- Health.FieldGet('FOOD_CODE'),')');
- Health.GetRec(Next_Record);
- end;
- Health.Close;
- end.
-