home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windoware
/
WINDOWARE_1_6.iso
/
source
/
tpwpxeng
/
bufcopy.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-07-22
|
799b
|
33 lines
program BufCopy;
uses PXEngine, WinCrt;
const TableName = 'Table';
var PxErr: Integer;
TblHandle: TableHandle;
SrcRecHandle,
DestRecHandle: RecordHandle;
procedure PX(Code : integer);
begin
writeln(PXErrMsg(Code));
end;
begin
PX(PXWinInit('MyApp', pxShared));
PX(PXTblOpen(TableName, TblHandle, 0, False));
PX(PXRecBufOpen(TblHandle, SrcRecHandle));
PX(PXRecBufOpen(TblHandle, DestRecHandle));
PX(PXRecGet(TblHandle, SrcRecHandle));
(* Copy source record handle to destination record handle *)
PxErr := PXRecBufCopy(SrcRecHandle, DestRecHandle);
if PxErr <> PxSuccess then
Writeln(PxErrMsg(PxErr));
PX(PXRecBufClose(SrcRecHandle));
PX(PXRecBufClose(DestRecHandle));
PX(PXTblClose(TblHandle));
PX(PXExit);
end.