home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
windows
/
wbtrv.zip
/
WBTRV.ACT
< prev
next >
Wrap
Text File
|
1990-11-02
|
2KB
|
50 lines
/* Copyright (c) 1990, Silverwood Software
* Placed in the public domain, 11/01/90
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
load("\actor\wbtrv.lod");
load();
/* LOAD BTRIEVE DLL */
trv:=new(Btrv);
loadDLL(trv);
/* INITIALIZE BTRIEVE */
initBtrv(trv,<configuration string - e.g: "/m:64 /p:2048 etc..">);
/* CREATE AND INITIALIZE A BUFFER */
datBufSz:=<database record size>;
numbFlds:=<number of fields in record>;
reco:=new(BtrvReco);
initReco(reco,datBufSz,numbFlds);
/* OPEN A BTRIEVE DATABASE */
openDat(trv, /* instance of decendant of Library class */
reco, /* instance of BtrvReco class */
"<FiNm>", /* database filename and path as string */
nil, /* database owner name as string or nil if no owner */
nil, /* length of owner name string or nil if no owner */
0); /* open mode: 0=normal -1=accelerated -2=read-only
* -3=verify -4=exclusive */
/* GET THE FIRST RECORD IN DATABASE */
status:=WBtrv(trv, /* instance of decendant of Library class */
vGetFirst, /* operation code from RES\WBTRV.H */
gPBlk(reco), /* position block */
gDBuf(reco), /* data buffer */
gDLen(reco), /* data buffer length */
gKBuf(reco), /* key buffer */
255, /* key buffer length - always set to 255 */
1); /* key path number */
/* PRINT DATA BUFFER IN THE ACTOR DISPLAY WINDOW */
printLine(gDBuf(reco));
/* CLOSE DATABASE */
closeDat(trv,reco);
/* REMOVE BTRIEVE AND UNLOAD DLL */
stopBtrv(trv);
freeDLL(trv);