Btree Database     Direct Access     btopen     Read/Write Flag     Lock Flag     Open Error

 

 

 

 

 

 

 

 

 

 

Btree Database

Direct Access

Sequential Access

Forward and Backward

 

 

 

 

 

Direct Access

1 Million Records

3 Reads

 

 

 

 

 

btopen

hdrfmt *btopen(char *dbname, int rwflag, int lockflag);


ptrMyFile = btopen("myfile.bt",UPDT,LOCK);

 

 

 

 

 

Read/Write Flag

Value Meaning
READ Read Only
UPDT Read/Write

 

 

 

 

 

Lock Flag

Value Meaning
LOCK Lock the database
TSTLOCK If database not locked, open without locking
NOLOCK Do not lock the database

 

 

 

 

 

Open Error

ptrMyFile = btopen("myfile.bt",UPDT,LOCK);

if (ptrMyFile == NULL)
    { error processing }