(*****************************************************************************)
(* FILE:   BTRIEVE.INC                                                       *)
(* RIGHTS: Reggatta Systems - COPYRIGHT 1995 - 1996                          *)
(* DESCR.: This module contains constants used for Btrieve file operations   *)
(*         and Error messages.                                               *)
(*                                                                           *)
(*                                                                           *)
(* Source Safe Control Information:                                          *)
(* ------------------------------------------------------------------------- *)
(* $Workfile:: BTRIEVE.INC        $                                          *)
(* $Author:: Pblair               $                                          *)
(* $Revision:: 25                 $                                          *)
(* $Date:: 3/31/00 11:12p         $                                          *)
(* $Modtime:: 3/25/00 11:10p      $                                          *)
(* ------------------------------------------------------------------------- *)
(*                                                                           *)
(*****************************************************************************)
Const
  { Btrieve open parms }
  NORMAL                         : ShortInt =  0;
  ACCELERATED                    : ShortInt = -1;
  READ_ONLY                      : ShortInt = -2;
  EXCLUSIVE                      : ShortInt = -4;

  { Btrieve Function calls }
  ISAM_OPEN                      = 00;
  ISAM_CLOSE                     = 01;
  ISAM_INSERT                    = 02;
  ISAM_UPDATE                    = 03;
  ISAM_DELETE                    = 04;
  ISAM_GET_EQUAL                 = 05;
  ISAM_GET_NEXT                  = 06;
  ISAM_GET_PREVIOUS              = 07;
  ISAM_GET_GREATER               = 08;
  ISAM_GET_GREATER_OR_EQUAL      = 09;
  ISAM_GET_LESS_THAN             = 10;
  ISAM_GET_LESS_THAN_OR_EQUAL    = 11;
  ISAM_GET_FIRST                 = 12;
  ISAM_GET_LAST                  = 13;
  ISAM_CREATE                    = 14;
  ISAM_STAT                      = 15;
  ISAM_EXTEND                    = 16;
  ISAM_SET_DIRECTORY             = 17;
  ISAM_GET_DIRECTORY             = 18;
  ISAM_BEGIN_TRANSACTION         = 19;
  ISAM_END_TRANSACTION           = 20;
  ISAM_ABORT_TRANSACTION         = 21;
  ISAM_GET_POSITION              = 22;
  ISAM_GET_DIRECT                = 23;
  ISAM_STEP_NEXT                 = 24;
  ISAM_STOP                      = 25;
  ISAM_VERSION                   = 26;
  ISAM_UNLOCK                    = 27;
  ISAM_RESET                     = 28;
  ISAM_SET_OWNER                 = 29;
  ISAM_CLEAR_OWNER               = 30;
  ISAM_ADD_INDEX                 = 31;
  ISAM_DROP_INDEX                = 32;
  ISAM_STEP_FIRST                = 33;
  ISAM_STEP_LAST                 = 34;
  ISAM_STEP_PREVIOUS             = 35;
  ISAM_GET_NEXT_EXTENDED         = 36;
  ISAM_GET_PREVIOUS_EXTENDED     = 37;
  ISAM_INSERT_EXTENDED           = 40;
  ISAM_GET_BYPERCENTAGE          = 44;
  ISAM_FIND_PERCENTAGE           = 45;
  ISAM_KEY_ONLY                  = 50;
  ISAM_UPDATE_CHUNK              = 53;

  ISAM_NO_LOCK_BIAS              = 0;     {  Btrieve     }
  ISAM_SINGLE_WAIT_LOCK_BIAS     = 100;   {  Btrieve     }
  ISAM_SINGLE_NOWAIT_LOCK_BIAS   = 200;   {  Btrieve     }
  ISAM_MULTIPLE_WAIT_LOCK_BIAS   = 300;   {  Btrieve     }
  ISAM_MULTIPLE_NOWAIT_LOCK_BIAS = 400;   {  Btrieve     }
  ISAM_NOWAIT_TRANSACT_BIAS      = 500;   {  Btrieve     }
  ISAM_CONCURRENT_TRANSACT_BIAS  = 1000;  {  Btrieve     }

  { Minimum Btrieve Error Constants }

  ISAM_SUCCESS                  = 00;  {  Sucessful operation              }
  ISAM_FILE_NOT_OPEN            = 03;  {  File not open                    }
  ISAM_KEYNOTFOUND              = 04;  {  Key value not found              }
  ISAM_DUPLICATEKEY             = 05;  {  Duplicate Key                    } 
  ISAM_INVALID_KEY_NO           = 06;  {  Key number not valid             }
  ISAM_EOF                      = 09;  {  End of File                      }
  ISAM_SYSTEM_CORRUPT           = 19;  {  System Corrupt Error             }
  ISAM_NOT_INITIALIZED          = 20;  {  Engine not initialized           } 
  ISAM_WRONGBUFFERSIZE          = 22;  {  Data buffer length               }
  ISAM_INVALID_KEY_SIZE         = 29;  {  Key length invalid               }
  ISAM_NULL_KEY_PATH            = 44;  {  Null key path                    }
  ISAM_INVALID_OWNERNAME        = 51;  {  Bad Owner Name                   }
  ISAM_FILE_IN_USE              = 85;  {  File in use                      }
  ISAM_DATA_BUFFER_TOO_SMALL    = 97;  {  Data buffer too small            }
  ISAM_NO_SUCH_TABLE            = 204; {  No Such Table                    }
  ISAM_INVALID_PASSWORD         = 205; {  Invalid Password                 }
  ISAM_NO_FIELDS_IN_VIEW        = 231; {  No Fields in View                }
  ISAM_CANT_OPEN_SYS_TABLES     = 285; { Can't open system tables          }
  ISAM_UNKNOWN_DATABASE         = 348;
  ISAM_BAD_COLUMN_POSITION      = 804;  
  ISAM_ENGINE_INITIALIZED       = 1016;{ Btrieve engine running already    }
  ISAM_SSQL_NOT_LOADED          = 2103;{ SSQL not loaded                   }  
  ISAM_FIELD_CONVERSION_ERROR   = 2999;


