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