home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
library
/
windows
/
pdoxeng
/
reclock.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-04-11
|
689b
|
31 lines
program RecLock;
uses PXEngine, WinCrt;
const TableName = 'Table';
var PxErr: Integer;
TblHandle: TableHandle;
RecHandle: RecordHandle;
LckHandle: LockHandle;
procedure PX(Code : integer);
begin
writeln(PXErrMsg(Code));
end;
begin
PX(PXWinInit('MyApp', pxShared));
PX(PXTblOpen(TableName, TblHandle, 0, False));
PX(PXRecBufOpen(TblHandle, RecHandle));
(* Attempt to lock current record *)
PxErr := PXNetRecLock(TblHandle, LckHandle);
if PxErr <> PxSuccess then
Writeln(PxErrMsg(PxErr))
else PX(PXNetRecUnlock(TblHandle, LckHandle));
PX(PXRecBufClose(RecHandle));
PX(PXTblClose(TblHandle));
PX(PXExit);
end.