
#include 'CdxDbe.ch'
#include 'DbfDbe.ch'
#include 'FoxDbE.ch'
#include 'NtxDbe.ch'
#include 'Set.ch'
#include 'Collat.ch'
  ////////////
  //   DbeSys.prg
  /////
PROCEDURE DbeSys()

Set(_SET_COLLATION, COLLAT_ASCII)

DbeLoad('dbfdbe', .t.)
DbeLoad('foxdbe', .t.)

DbeLoad('ntxdbe', .t.)                             // NTX
DbeLoad('cdxdbe', .t.)                             // CDX

if !DbeBuild('DbfNtx', 'dbfdbe', 'ntxdbe')          // 'DbfNtx' := DBF com índices NTX
   Stop_('DBFNTX Database-Engine: could not build engine', .f.)
endif
DbeInfo(COMPONENT_DATA , DBFDBE_LOCKRETRY, 100000)
DbeInfo(COMPONENT_DATA , DBFDBE_LOCKDELAY,     10)
DbeInfo(COMPONENT_DATA,  DBFDBE_LIFETIME,       0)

DbeInfo(COMPONENT_ORDER, NTXDBE_LOCKRETRY, 100000)
DbeInfo(COMPONENT_ORDER, NTXDBE_LOCKDELAY,     10)

if !DbeBuild('DbfCdx', 'dbfdbe', 'cdxdbe')          // 'DbfCdx' := DBF com índices CDX
   Stop_('DBFCDX Database-Engine: could not build engine', .f.)
endif
DbeInfo(COMPONENT_DATA , DBFDBE_LOCKRETRY, 100000)
DbeInfo(COMPONENT_DATA , DBFDBE_LOCKDELAY,     10)
DbeInfo(COMPONENT_DATA,  DBFDBE_LIFETIME,       0)

DbeInfo(COMPONENT_ORDER, CDXDBE_LOCKRETRY, 100000)
DbeInfo(COMPONENT_ORDER, CDXDBE_LOCKDELAY,     10)
DbeInfo(COMPONENT_ORDER, DBE_LOCKMODE,     LOCKING_EXTENDED)
DbeInfo(COMPONENT_ORDER, CDXDBE_MODE,      CDXDBE_VFOXPRO)


if !DbeBuild('FoxCdx', 'foxdbe', 'cdxdbe' )        // 'FoxCdx' := DBF compatível com FoxPro com índices CDX
   Stop_('FOXCDX Database-Engine: could not build engine', .f.)
endif
DbeInfo(COMPONENT_DATA,  FOXDBE_LOCKRETRY, 100000)
DbeInfo(COMPONENT_DATA,  FOXDBE_LOCKDELAY,     10)
DbeInfo(COMPONENT_DATA,  FOXDBE_LIFETIME,       0)

DbeInfo(COMPONENT_ORDER, CDXDBE_LOCKRETRY, 100000)
DbeInfo(COMPONENT_ORDER, CDXDBE_LOCKDELAY,     10)
DbeInfo(COMPONENT_ORDER, DBE_LOCKMODE,     LOCKING_EXTENDED)
DbeInfo(COMPONENT_ORDER, CDXDBE_MODE,      CDXDBE_VFOXPRO)


if !DbeBuild('FoxNtx', 'foxdbe', 'ntxdbe' )        // 'FoxCdx' := DBF compatível com FoxPro com índices IDX

   Stop_('FOXNTX Database-Engine: could not build engine', .f.)
endif
DbeInfo(COMPONENT_DATA,  FOXDBE_LOCKRETRY, 100000)
DbeInfo(COMPONENT_DATA,  FOXDBE_LOCKDELAY,     10)
DbeInfo(COMPONENT_DATA,  FOXDBE_LIFETIME,       0)

DbeInfo(COMPONENT_ORDER, CDXDBE_LOCKRETRY, 100000)
DbeInfo(COMPONENT_ORDER, CDXDBE_LOCKDELAY,     10)
DbeInfo(COMPONENT_ORDER, DBE_LOCKMODE,     LOCKING_EXTENDED)

DbeLoad('deldbe', .f.)                             // Arquivos delimitados
DbeLoad('sdfdbe', .f.)                             // Arquivos SDF
                  //
                  //    Default
DbeSetDefault('FoxCdx')
RETURN
