home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
library
/
windows
/
pdoxeng
/
getlong.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-04-11
|
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.