Constants.LAFFDB
;..........................................................................................................................................
AddExtender("LAFFD34I.DLL")
LAFFD_RESERVED                =  0  ; Zero value e.g. for reserved flags.
LAFFD_RET_SUCCESS             =  1  ; Returncode on success.

LAFFD_DB_HANDLE_IS_INVALID    =  0  ; Not a valid database handle.
LAFFD_DB_HANDLE_IS_VALID      =  1  ; A valid database handle.

LAFFD_DB_MUST_EXIST           =  0  ; File MUST exist.
LAFFD_DB_MUST_NOT_EXIST       =  1  ; If file does not exist, create an empty database.

LAFFD_DB_MODEL_DISK           =  0  ; Disk-based. Any changes to the database are immediately reflected on the disk file.
LAFFD_DB_MODEL_MEMORY         =  1  ; Memory-based. No disk functions are used.
LAFFD_DB_MODEL_TRADITIONAL    =  2  ; Traditional. Database is loaded from disk, manipulated in memory, and saved back to disk.

LAFFD_DB_FORMAT_DELIM_SEP     =  0  ; Delimiter-based.
LAFFD_DB_FORMAT_SPACE_SEP     =  1  ; Space-separator based. If a column’s data has a space, the column must be in quotes.
LAFFD_DB_FORMAT_FIXED_COL     =  2  ; Fixed columns.

LAFFD_DB_IS_NOT_MODIFIED      =  0  ; Database has not been modified since the last load or save.
LAFFD_DB_IS_MODIFIED          =  1  ; Database has been modified and needs to be saved if you want the data in memory to match the file.

LAFFD_DB_FIRST_LINE_DATA      =  0  ; Will use the number of columns in the first line of the text file.
LAFFD_DB_FIRST_LINE_HEADER    = -1  ; Will use the number of columns in the first line of the text file,
                                    ; name the columns according to the values in the first line of the text file,
                                    ; and will start reading actual data on the second line of the file.
LAFFD_DB_FIRST_COL_IS_ZERO    =  0  ; First column is zero.
LAFFD_DB_FIRST_COL_IS_ONE     =  1  ; First column is one.

LAFFD_OP_ADD                  =  0  ; Add.      C = A+B. If the same record exists in both A and B, then C will contain two copies of the record.
LAFFD_OP_SUBTRACT             =  1  ; Subtract. C = A-B. If the same record exists in both A and B, then C will not contain that record.
LAFFD_OP_AND                  =  2  ; AND.      C = A & B. C will only contain records that are in both A and B.
LAFFD_OP_OR                   =  3  ; OR.       C = A | B. Like addition, except if the same record exists in both A and B, then C will only contain one instance of that record.
LAFFD_OP_NOT                  =  4  ; NOT.      C = A ! B. C will only contain records exclusive to either A or B.
LAFFD_OP_REMOVEDUP            =  5  ; Remove Duplicates from A.     C = A - duplicates.
LAFFD_OP_LEAVEDUP             =  6  ; Leave only duplicates from A. C = Duplicates in A.
LAFFD_OP_INNERJOIN            =  7  ; Inner Join. This is the SQL Inner Join.
LAFFD_OP_LEFTJOIN             =  8  ; Left Join.  This is the SQL Left Join.

LAFFD_CLONE_RECNO_FIXED       =  1  ; Recordnum is a fixed record number.
LAFFD_CLONE_RECNO_VAR         =  2  ; Recordnum is a variable record number.
LAFFD_CLONE_RET_RECNO_FIXED   =  8  ; Return a fixed record number.
LAFFD_CLONE_RET_RECNO_VAR     = 16  ; Return a variable record number.
LAFFD_CLONE_AFTER_SRC         =  4  ; Place the cloned record right after the source record (preserves any sort order).
LAFFD_CLONE_AT_END            = 32  ; Place the cloned record at the end of the database (could cause data to be unsorted).
LAFFD_CLONE_DEFAULT           =  0  ; Same as 1|8|32.

LAFFD_FIND_RECNO_FIXED        =  1  ; Recordnum is a fixed record number.
LAFFD_FIND_RECNO_VAR          =  2  ; Recordnum is a variable record number.
LAFFD_FIND_RET_RECNO_FIXED    =  4  ; Return a fixed record number.
LAFFD_FIND_RET_RECNO_VAR      =  8  ; Return a variable record number.
LAFFD_FIND_SEARCH_BACKWARDS   = 16  ; Search backwards.
LAFFD_FIND_DEFAULT            =  0  ; Same as 1|4.
LAFFD_FIND_IGNORE_CASE        =  0  ; Not case sensitive.
LAFFD_FIND_RESPECT_CASE       =  1  ; Case sensitive.
LAFFD_FIND_NO_MATCH           = -1  ; No matching record found.

LAFFD_GETCOLTYPE_STRING       = "S" ; String.
LAFFD_GETCOLTYPE_INT          = "I" ; Integer (no decimal point).
LAFFD_GETCOLTYPE_FLOAT        = "F" ; Floating Point.
LAFFD_GETCOLTYPE_ERROR        = "E" ; Error. Use dbGetLastError to find out what went wrong.

LAFFD_GETNEXT_RECNO_FIRST_LAST= -1  ; Recordnum. Returns the value specified by flags 16 or 32.
LAFFD_GETNEXT_RECNO_FIXED     =  1  ; Recordnum is a fixed record number.
LAFFD_GETNEXT_RECNO_VAR       =  2  ; Recordnum is a variable record number.
LAFFD_GETNEXT_RET_RECNO_FIXED =  4  ; Return a fixed record number.
LAFFD_GETNEXT_RET_RECNO_VAR   =  8  ; Return a variable record number.
LAFFD_GETNEXT_RET_FIRST       = 16  ; Return the first item in the database.
LAFFD_GETNEXT_RET_LAST        = 32  ; Return the last item in the database.
LAFFD_GETNEXT_RET_PRV_NEXT    = 64  ; Return the previous item versus the next item.
LAFFD_GETNEXT_DEFAULT         =  0  ; Same as 1|4.
LAFFD_GETNEXT_EOD             = -1  ; End of database (or beginning of database) reached.

LAFFD_MAKENEW_RET_RECNO_FIXED =  1  ; Return a fixed record number.
LAFFD_MAKENEW_RET_RECNO_VAR   =  2  ; Return a variable record number.
LAFFD_MAKENEW_DEFAULT         =  0  ; Same as 1.

LAFFD_DELREC_RECNO_FIXED      =  1  ; Recordnum is a fixed record number.
LAFFD_DELREC_RECNO_VAR        =  2  ; Recordnum is a variable record number.

LAFFD_GETREC_RECNO_FIXED      =  1  ; Recordnum is a fixed record number.
LAFFD_GETREC_RECNO_VAR        =  2  ; Recordnum is a variable record number.
LAFFD_GETREC_RECNO_IS_BOUND   =  4  ; Require all columns to be bound with dbBindCol.
LAFFD_GETREC_DEFAULT          =  0  ; Sameas 1.

LAFFD_SETREC_RECNO_FIXED      =  1  ; Recordnum is a fixed record number.
LAFFD_SETREC_RECNO_VAR        =  2  ; Recordnum is a variable record number.
LAFFD_SETREC_ADD_NEW          =  4  ; Add a new item (ignore recordnum).
LAFFD_SETREC_RET_RECNO_FIXED  =  8  ; Return a fixed record number.
LAFFD_SETREC_RET_RECNO_VAR    = 16  ; Return a variable record number.
LAFFD_SETREC_RECNO_IS_BOUND   = 32  ; Require all columns to be bound with dbBindCol.
LAFFD_SETREC_DEFAULT          =  0  ; Same as 4|8.

LAFFD_GETFLD_RECNO_FIXED      =  1  ; Recordnum is a fixed record number.
LAFFD_GETFLD_RECNO_VAR        =  2  ; Recordnum is a variable record number.
LAFFD_GETFLD_DEFAULT          =  0  ; Same as 1.

LAFFD_SETFLD_RECNO_FIXED      =  1  ; Recordnum is a fixed record number.
LAFFD_SETFLD_RECNO_VAR        =  2  ; Recordnum is a variable record number.
LAFFD_SETFLD_ADD_NEW          =  4  ; Generate an error if the new string data is too long to fit in the column.
LAFFD_SETFLD_DEFAULT          =  0  ; Same as 1.

LAFFD_SORT_DESC               =  0  ; Sort descending.
LAFFD_SORT_ASC                =  1  ; Sort ascending.

LAFFD_SET_ERROR_REPORT        =  0  ; Call dbGetLastError to capture errors (default).
LAFFD_SET_ERROR_REPORT        =  1  ; Display any errors generated at the completion of any function call.
                                    ; The error log will NOT be cleared, and the functions will still return failure codes in the event of trouble.
                                    ; Your code still must clear the log with dbGetLastError.
                                    ; The reason for this is to keep debuild/release WinBatch scripts identical.
;..........................................................................................................................................