home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windoware
/
WINDOWARE_1_6.iso
/
source
/
tpwpxeng
/
getlong.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-07-22
|
838b
|
34 lines
program GetLong;
uses PXEngine, WinCrt;
const TableName = 'Table';
var PxErr: Integer;
TblHandle: TableHandle;
RecHandle: RecordHandle;
FldHandle: FieldHandle;
LValue: LongInt;
procedure PX(Code : integer);
begin
writeln(PXErrMsg(Code));
end;
begin
PX(PXWinInit('MyApp', pxShared));
PX(PXTblOpen(TableName, TblHandle, 0, False));
PX(PXRecBufOpen(TblHandle, RecHandle));
PX(PXRecGet(TblHandle, RecHandle));
PX(PXFldHandle(TblHandle, 'Numeric Field', FldHandle));
(* Get a double value from a record *)
PxErr := PXGetLong(RecHandle, FldHandle, LValue);
if PxErr <> PxSuccess then
Writeln(PxErrMsg(PxErr))
else Writeln('Field number ', FldHandle, ' contents: ', LValue);
PX(PXRecBufClose(RecHandle));
PX(PXTblClose(TblHandle));
PX(PXExit);
end.