home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windoware
/
WINDOWARE_1_6.iso
/
source
/
tpwpxeng
/
tblnrecs.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-07-22
|
581b
|
28 lines
program TblNRecs;
uses PXEngine, WinCrt;
const TableName = 'Table';
var PxErr: Integer;
TblHandle: TableHandle;
NRecs: RecordNumber;
procedure PX(Code : integer);
begin
writeln(PXErrMsg(Code));
end;
begin
PX(PXWinInit('MyApp', pxShared));
PX(PXTblOpen(TableName, TblHandle, 0, False));
(* Determine how many records are in table *)
PxErr := PXTblNRecs(TblHandle, NRecs);
if PxErr <> PxSuccess then
Writeln(PxErrMsg(PxErr))
else Writeln('Number of records: ', NRecs);
PX(PXTblClose(TblHandle));
PX(PXExit);
end.