ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ DB/C Newsletter ³ ³ December 1993 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Editor's Notes This month's newsletter is a short one. The topic is Btrieve. I hope you find it informative. DNW Btrieve An alternative database for NetWare users is the NetWare Btrieve Record Manager. The Btrieve database is included with NetWare and can be easily implemented with DB/C 8.0 using DB/C's NATIVE interface routines. The 8086 version of DB/C requires the version 7 Microsoft C compiler. The 386 version of DB/C requires the version 9.5 Watcom C/386 compiler. Here are some of the highlights of a Btrieve indexed file: 1. INSERT's and DELETEK's for secondary indexes are not necessary. 2. WRITE's and UPDATE's automatically modify the values for all keys, including secondary keys. 3. Keys can be arranged in descending order. 4. File size can be up to 4 Gigabytes in length. 5. Files can be partitioned across network volumes. 6. The Btrieve data structure consists of a balanced B-tree structure which reuses free disk space created by deleted records. 7. Optional automatic data recovery (if a system failure occurs) is supported. 8. Blank compression supported on records with trailing blanks. 9. Both fixed and variable record lengths are supported. 10. SMS support can be used to backup files while concurrently opened by users. 11. An I/O buffer cache may be used. A Btrieve index can support up to 24 key segments. A segment is the record field used to create the key value. A key consists of 1 or more key segments. More than 1 key may exist for an indexed file as long as the total number of key segments does not exceed 24. The maximum length of a Btrieve key is 255 bytes, but DB/C will only support reading keys with a maximum length of 132 bytes. The DB/C verbs READ (by key), READKS, READKP, WRITE (by key), UPDATE, DELETE and FILEPI are supported with a Btrieve index. READ and WRITE with a negative value (sequential access) are supported, but this type of access may interfere with the current index position. READ and WRITE with a positive value (random access) are not supported. INSERT, DELETEK and record locks are ignored by DB/C for NATIVE files. Partial WRITE's and UPDATE's including short record UPDATE's are not supported. All record I/O should consist of the entire record. FILEPI's do not cause the file to be locked, but sets a flag associated with the file so that all reads will lock the record being read. The records are unlocked when the FILEPI 0 occurs. The KEYLENGTH parameter of the file declaration determines which index key the reads will use. For example, KEYLENGTH=1 is for the first key (key number 0), KEYLENGTH=2 is for the second key (key number 1). Btrieve includes utilities to manipulate Btrieve indexed flies. Several of the utilities include a CREATE utility to define the details of an index file, a LOAD utility to merge a sequential file into an index file and a SAVE utility to extract records from an index file to a sequential file. The DB/C utilities will not be able to access a Btrieve file, but can access the output file created by the SAVE utility. For DB/C to access Btrieve type files, the files NIOBTRV.C and BTRV.C must be compiled and linked into DBC. These files are available on the BBS in the NIO file area. For NetWare 3.11 and higher, BTRIEVE.NLM and BSPXCOM.NLM must be loaded on the server. For NetWare's prior to 3.11, BSERVER.VAP must be loaded on the server. The workstation must load BREQUEST.EXE before accessing network Btrieve files. For further information, refer to the DB/C Developer's Guide, Implementing Native Files on page 254 and the Novell Btrieve Record Manager manual. DB/C Class Schedule The next DB/C classes scheduled for January 31 through February 3. The classes are held in the Oak Brook, Illinois office of Subject, Wills & Company. For more information, contact Judi Tamkevic at (708) 572-0240.