home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
library
/
windows
/
pdoxeng
/
putdoub.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-04-11
|
800b
|
36 lines
{$N+}
program PutDoub;
uses PXEngine, WinCrt;
const TableName = 'Table';
var PxErr: Integer;
TblHandle: TableHandle;
RecHandle: RecordHandle;
FldHandle: FieldHandle;
Doub: Double;
procedure PX(Code : integer);
begin
writeln(PXErrMsg(Code));
end;
begin
PX(PXWinInit('MyApp', pxShared));
Doub := 34567.0;
PX(PXTblOpen(TableName, TblHandle, 0, False));
PX(PXRecBufOpen(TblHandle, RecHandle));
PX(PXFldHandle(TblHandle, 'Numeric Field', FldHandle));
(* Update value with Double value *)
PxErr := PXPutDoub(RecHandle, FldHandle, Doub);
if PxErr <> PxSuccess then
Writeln(PxErrMsg(PxErr))
else PX(PXRecUpdate(TblHandle, RecHandle));
PX(PXRecBufClose(RecHandle));
PX(PXTblClose(TblHandle));
PX(PXExit);
end.