# ESB_DBSTATE_T

This database State Structure gets and sets the state parameters for a specific database. All fields in this structure can be modified using the VB API. See also the ESB_DBINFO_T and ESB_DBSTATS_T structures, which contain additional database information that cannot be modified.

    Type ESB_DBSTATE_T

       Description         As String * ESB_DESCLEN
       Loadable            As Integer
       Autoload            As Integer
       Access              As Integer
       IndexType           As Integer
       MaxMem              As Long
       MaxCompMem          As Long
       MaxMemIndex         As Long
       IndexPageSize       As Long
       CalcNoAggMissing    As Integer
       CalcNoAvgMissing    As Integer
       CalcTwoPass         As Integer
       CalcCreateBlock     As Integer
       CrDbName            As String * ESB_DBNAMELEN
       CrTypeMember        As String * ESB_MBRNAMELEN
       CrConvType          As Integer
       DataCompress        As Integer
       RetrievalBuffer     As Long
       RetrievalSortBuffer As Long
       TimeOut             As Long
       CommitBlocks        As Long
       CommitRows          As Long
       nVolumes            As Long
       DataCompressType    As Integer
       IsolationLevel      As Integer
       PreImage            As Integer
    End Type

The fields are:

VB Data Type | Field | Description
As String * ESB_DESCLEN | Description | Database description (up to 80 characters)
As Integer | Loadable | Flag to indicate whether the database may be loaded (ESB_TRUE if the database is loadable)
As Integer | Autoload | Flag to indicate whether the database will automatically be loaded when the application is started (ESB_TRUE if the database will be automatically loaded)
As Integer | Access | Default access level to the database. See Bitmask Data Types for a list of values this field can contain.
As Integer | IndexType | Database index type (array or tree). Values: ESB_INDEXTYPE_ARRAY ESB_INDEXTYPE_AVL For API Releases 4 and later, the IndexType field is obsolete.
As Long | MaxMem | Maximum memory reserved for non-compressed data blocks in the database (in bytes)
As Long | MaxCompMem | Maximum memory reserved for compressed data blocks in database (in bytes)
As Long | MaxMemIndex | Minimum index cache size. Value: 1048576. Set using the constant ESB _INDEXCACHEMIN_SIZE
As Long | IndexPageSize | Size of index page in which buffer pool is constructed in (in bytes). Minimum index page size. Value: 1024. Set using the constant ESB_INDEXPAGEMIN_SIZE Maximum page size for the IndexPageSize field. Value: 8192. Set using the constant ESB_INDEXPAGEMAX_SIZE
As Integer | CalcNoAgg Missing | Flag to suppress aggregation of members if all their children are missing (ESB_TRUE if missing values are not aggregated)
As Integer | CalcNoAvg Missing | Flag to suppress inclusion of missing members in calculating averages (ESB_TRUE if missing values are not included)
As Integer | CalcTwoPass | Flag to force two pass calculation when running full calculation of database (ESB_TRUE if two pass calculation is enabled)
As Integer | CalcCreate Block | Flag to force creation of data block on constant assignment calc equation (only valid for sparse dimensions). Set to ESB_TRUE if blocks are forcibly created.
As String * ESB_DBNAMELEN | CrDbName | The name of associated currency database (valid in non-currency databases)
As String * ESB_MBRNAMELEN | CrTypeMember | The name of currency conversion type member (valid in non-currency databases)
As Integer | CrConvType | Currency conversion type (whether currency conversions are calculated by multiplication or division). Values: ESB_CRCTYPE_DIV ESB_CRCTYPE_MULT
As Integer | DataCompress | Optional Flag to determine whether to compress blocks for this database.
As Long | RetrievalBuffer | Specifies the size, in kilobytes, of the server buffer that holds extracted row data cells before they are evaluated by the RESTRICT, TOP, or BOTTOM commands. The default is 2048 bytes.
As Long | RetrievalSortBuffer | Specifies the size, in kilobytes, of the server buffer that holds the data to be sorted during a retrieval. The default is 10240 bytes.
As Long | TimeOut | The timeout interval in seconds. This can only be set for COMMITTED access. -1 is Indefinite wait. 0 is Immediate access, no wait (the default). n is the specified interval in seconds.
As Long | CommitBlocks | The number of data blocks modified before performing the explicit commit (only used when isolation level is UNCOMMITTED).
As Long | CommitRows | The number of rows of the input file to data load before performing the explicit commit (only used when isolation level is UNCOMMITTED).
As Long | nVolumes | The number of disk volume settings for this database.
As Integer | DataCompressType | The data compression type used for write operations if the optional compression flag is set. Bitmap - uses a bitmap to represent data cells (the default). Run-Length Encoding - compresses any consecutive repetitive values. No Compression - does not compress the data.
As Integer | IsolationLevel | The isolation level: COMMITTED - write locks on all affected data blocks restrict access until the transaction commits. UNCOMMITTED - (default) write locks are acquired and released as needed during the transaction.
As Integer | PreImage | The flag to read previously committed data during read-only requests. This flag can only be set for COMMITTED access. The default is YES.