Skip to content

Call_Driver Function Constants

There are several symbolic constants defined for the embedded (DataFlex) database driver. They are described in the following table. They can be used in the Call_Driver command to call the functions they represent.

Name Meaning
FLEX_SET_MAX_SORT_BUFFER Sets the maximum amount of memory to be used in sorting. The default is 8 Megabytes, or all available, if it is less.
FLEX_GET_MAX_SORT_BUFFER Reports the maximum amount of memory to be used for sorting.
FLEX_SET_INDEX_OPT Sets whether index data may be returned to the program on record finds.
FLEX_GET_INDEX_OPT Returns whether index data may be returned to the program on record finds.
FLEX_REPAIR_FILE Repairs a table that is damaged.
FLEX_GET_REPAIRS_NEEDED Does an inspection of the file header, reporting errors found.
FLEX_GET_STRICT_TRANSACTIONS Returns whether absence of TTS generates error when SERVER_ATOMIC tables are opened.
FLEX_SET_STRICT_TRANSACTIONS Sets whether absence of TTS generates error when SERVER_ATOMIC tables are opened.

Notes About the Above Functions

  • When repairing a table, there are two phases:
  • The header is repaired, if necessary.
  • The table is sorted, which repairs damaged indexes and a corrupt .VLD file. If you wish to skip the sort, there is a parameter of the call_driver command for doing so.

  • These constants are returned by FLEX_GET_REPAIRS_NEEDED to report what repairs are needed:

  • FLEX_HEADER_OK
  • FLEX_BLOCK0_BAD
  • FLEX_HEADER_BAD
  • FLEX_HEADER_INTEGRITY_OFF
  • FLEX_HEADER_UNREADABLE

If FLEX_GET_REPAIRS_NEEDED returns FLEX_HEADER_UNREADABLE, the table probably cannot be repaired; if it returns FLEX_HEADER_INTEGRITY_OFF, it definitely cannot be.

  • To keep a table repairable, you must keep its header-integrity checking turned on (in Table Editor – Properties Panel). This maintains a .HDR file for the table that is examined by the FLEX_GET_REPAIRS_NEEDED function and used by the FLEX_REPAIR_FILE function.

  • If you attempt to set FLEX_SET_MAX_SORT_BUFFER to a value less than 32K, you will receive an error. Note that this function uses Kilobytes (1K = 1024 bytes).

  • These constants are returned by FLEX_GET_INDEX_OPT to report under what conditions programs may use data as contained in indexes instead of filling the record buffer to access record data after a find:

  • FLEX_INDEX_OPT_ON
  • FLEX_INDEX_OPT_OFF
  • FLEX_INDEX_OPT_PERMISSIVE

ON is the default setting, allowing the use of index data for all segments that are not set case-insensitive. OFF prohibits all use of index data; the record buffer is always loaded. PERMISSIVE allows the use of all index data, including that in case-insensitive index segments.

  • FLEX_SET_STRICT_TRANSACTIONS is useful for utility and other programs that do not enter or edit transactions and may be executed without the NetWare shell. If a table whose DF_FILE_TRANSACTION attribute is set to SERVER_ATOMIC is opened by an application not running under the NetWare shell, an error will be returned. Setting this function to DFFALSE will suppress the error and permit the open, without modifying the table's attribute.

See Also