home *** CD-ROM | disk | FTP | other *** search
- program DemoE004;
- {------------------------------------------------------------------------------
- DBase File Display
- Expanded Sample 4
- Demo Program
-
- Copyright (c) Richard F. Griffin
-
- 10 February 1992
-
- 102 Molded Stone Pl
- Warner Robins, GA 31088
-
- -------------------------------------------------------------
- Use FieldDisplayScreen to display all record fields on-screen.
-
- ********** Not For Use in a TurboVision Environment **********
-
- If it does not already exist, the DEMOE4.DBF file will be created
- by using the MakeTestData procedure in GS_GENF.PAS.
-
- All fields in the dBase record will be displayed on-screen using
- the FieldDisplayScreen procedure in GS_dBFld_Objt. The memo
- record may also be viewed (but not modified).
-
- Keys that may be used are:
-
- ESC Exits
- F10 Next Record
- PgUp Top of Record; Previous Record if Already at Top
- PgDn Bottom of Record; Next Record if at Bottom
- Cursor Up, Down
-
- -------------------------------------------------------------------------------}
-
- uses
- CRT,
- DOS,
- GS_KeyI,
- GS_FileH,
- GS_dBFld,
- GS_dBase,
- GS_GenF;
- var
- MyFile : GS_dBFld_Objt;
- CkFile : file;
-
- begin
- ClrScr;
- if not GS_FileExists(CkFile,'DEMOE4.DBF') then
- begin
- writeln('Creating DemoE4.DBF');
- MakeTestData('DemoE4', 20, true);
- writeln('DEMOE4.DBF Created');
- ClrScr;
- end;
- MyFile.Init('DEMOE4');
- MyFile.Open;
- MyFile.GetRec(Top_Record);
- while (MyFile.FieldDisplayScreen) and (not MyFile.File_EOF) do
- begin
- if GS_KeyI_Chr = Kbd_PgUp then
- MyFile.GetRec(Prev_Record)
- else
- MyFile.GetRec(Next_Record);
- end;
- MyFile.Close;
- end.
-