home *** CD-ROM | disk | FTP | other *** search
- program DB_Xpl01;
- uses
- CRT,
- DOS,
- GS_dBFld,
- GS_dBase;
- var
- Health : GS_dBFld_Objt; {object of type GS_dBFld_Objt}
-
- begin
- ClrScr;
- Health.Init('HEALTH'); {Initialize object using the dBase III}
- {file HEALTH.DBF. Extension assumed}
- Health.Open; {Open the object's file}
- Health.GetRec(Top_Record); {Get the first record in the file}
- while not Health.File_EOF do {Repeat until end-of-file}
- begin
- writeln(Health.FieldGet('FOOD'),' ',
- Health.FieldGet('CALS'),' (',
- Health.FieldGet('FOOD_CODE'),')');
- {Displays three fields. Each field is}
- {retrieved by passing the field name to}
- {objectname.Formula }
-
- Health.GetRec(Next_Record); {Get the next sequential record}
- end;
- Health.Close; {Close the dBase III file}
- end.