Advanced ISAM techniques

This chapter provides information about programming an application that uses FairCom DB. This information is NOT necessary for using Btrieve, which simply involves installing, migrating, and configuring.

A FairCom ISAM tutorial can be found in the in the tutorials directory under the ctree.btrv driver.

Note: This tutorial explains how to program an application that uses FairCom DB. These procedures are NOT necessary for using FairCom ISAM, which simply involves installing, migrating, and configuring as explained in this guide.

The goal of this tutorial is to introduce the most basic FairCom ISAM API to accomplish creating and manipulating a table. From a functional point of view this application will perform the following:

  1. Log onto a session.
  2. Add a table with some fields.
  3. Populate the table with a few records.
  4. Display the contents of the table.

Sample Program: btrv_tutorial1

A FairCom ISAM tutorial can be found in the in the tutorials directory under the ctree.btrv driver.

Note: This tutorial explains how to program an application that uses FairCom DB. These procedures are NOT necessary for using FairCom ISAM, which simply involves installing, migrating, and configuring as explained in this guide.

The goal of this tutorial is to introduce the most basic FairCom ISAM API to accomplish creating and manipulating a table. From a functional point of view this application will perform the following:

  1. Log onto a session.
  2. Add a table with some fields.
  3. Populate the table with a few records.
  4. Display the contents of the table.

FairCom ISAM Login/Logout Operation

The ISAM Login/Logout operation (ISAM opcode 78) is now supported.

The ISAM application must call the ISAM Login API passing a URI in the ISAM standard format:

access_method://user@host/dbname?parameters

where:

  • access_method is "ISAM"
  • user is the c-tree Server user ID
  • dbname is the c-tree Server name
  • user password is specified in parameters as "pwd=password"

If the Login operation returns successfully, all subsequent operations will be operated on the specified server until a Logout operation is called.

ISAM Extended Index Types

Support has been added to FairCom ISAM for extended key types on the following ISAM types:

  • STRING
  • INTEGER
  • IEEE
  • DATE
  • TIME
  • DECIMAL
  • MONEY
  • NUMERIC
  • ZSTRING
  • UNSIGNED_BINARY
  • AUTOINCREMENT
  • BIT
  • NUMERICSTS
  • NUMERICSA
  • CURRENCY
  • NUMERICSLB
  • NUMERICSLS
  • NUMERICSTB
  • NULL_INDICATOR

 

ISAM transactional type column = c-tree ISAM engine.

Relational type = c-tree SQL engine.

ISAM Exclusive transaction = Means only one user. c-tree doesn’t have exclusive transaction; similar to single user.

Support for Exclusive Transactions in FairCom ISAM

FairCom introduces exclusive transaction support required for better compliance with the Btrieve API. A file accessed within an exclusive transaction is now locked for the entire duration of the transaction.

Support for ISAM Create Index Operation

This release introduces support for creating new indexes on existing files (op code 31) in FairCom ISAM.