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