home *** CD-ROM | disk | FTP | other *** search
- {$A+,B+,D-,E+,F-,I-,L-,N-,O-,R-,S-,V-}
- {$M 16384,0,655360}
-
- Program Demo2;
-
- Uses Crt,Dos,TPDB;
-
- Var
- Total : Real;
-
- begin
- DBOpenFile('demo2.dbf');
- GetDBRec(1);
- Display;
- ClrScr;
- Writeln('Summing Number field in 1000 records.');
- Writeln;
- Total := Sum(8);
- Writeln('Total of Number fields is ',Total:10:2);
- Writeln;
- GetDBRec(886);
- Writeln('The string conversion of the number field in');
- Writeln(' record number 886 is ',FieldToStr(8));
- Writeln;
- GetDBRec(1);
- If BOF then Writeln('We are now at the beginning of the file.');
- Writeln;
- GetDBRec(1000);
- If EOF then Writeln('We are now at the end of the file.');
- Writeln;
- Wait;
- CloseDBFile;
- end.