const
  LastErrorACode = 20303;

const
  ErrorAUnknownError = 'Unknown error';
  ErrorANilPointer = 'Pointer is nil';
  ErrorAHandleError = 'Error creating table handle';
  ErrorAInvalidSessionName = 'Invalid session name ''%s''';
  ErrorASessionActive = 'Cannot perform this operation on an active session';
  ErrorAAutoSessionActive = 'Cannot modify SessionName while AutoSessionName is enabled';
  ErrorABlankDatabaseFileName = 'DatabaseFileName property is blank';
  ErrorABlankDatabaseName = 'DatabaseName property is blank';
  ErrorADatabaseFileNotExist = 'Database file ''%s'' does not exist';
  ErrorACannotDeleteConnectedDatabse = 'DeleteDatabase error. Database is connected';
  ErrorACannotRenameConnectedDatabse = 'RenameDatabase error. Database is connected';
  ErrorADuplicateSessionName = 'Duplicate session name ''%s''';
  ErrorASessionNameMissing = 'Session name missing';
  ErrorAEngineNotInitialized = 'Database Engine is not initialized';
  ErrorAAutoSessionExclusive = 'Cannot enable AutoSessionName property with more than one session on a form or data-module';
  ErrorAAutoSessionExists = 'Cannot add a session to the form or data-module while session ''%s'' has AutoSessionName enabled';
  ErrorADatabaseHandleSet = 'Database handle owned by a different session';
  ErrorADatabaseOpen = 'Cannot perform this operation on an open database';
  ErrorADuplicateDatabaseName = 'Duplicate database name ''%s''';
  ErrorADatabaseCreate = 'Cannot create database';
  ErrorADatabaseClosed = 'Cannot perform this operation on a closed database';
  ErrorADatabaseNameMissing = 'Database name missing';
  ErrorADatabaseOpenError = 'Database open error';
  ErrorANoTableName = 'Missing TableName property';
  ErrorACannotDeleteBusyTable = 'Cannot delete table ''%s''. Table is open by another dataset';
  ErrorAIndexNotFound = 'Index not found';
  ErrorANotIndexField = 'Field %s is not in the current index';
  ErrorABTreeInvalidCall = 'Internal index error';
  ErrorABTreeEmptyPage = 'Index error: page is empty';
  ErrorABTreeInvalidPage = 'Index error: invalid page number';
  ErrorABTreeInvalidParams = 'Index error: invalid params';
  ErrorABTreeInvalidPosition = 'Index error: invalid position';
  ErrorABTreeDeleteEntryNotFound = 'Index error: cannot delete entry. Entry not found';
  ErrorACannotDeleteIndex = 'Cannot delete index ''%s''. Index not found';
  ErrorAIndexAlreadyExists = 'Cannot create index ''%s''. Index already exists';
  ErrorAIndexPagesNotReleased = 'Index pages are not released';
  ErrorAIndexIntegrityViolated = 'Index integrity error. PageNo=%d EntryNo=%d';
  ErrorAIndexIntegrityCircularLinks = 'Index integrity error. Circular links. PageNo=%d EntryNo=%d';
  ErrorAIndexIntegrityLeafLinks = 'Index integrity error. Invlaid leaf link. PageNo=%d EntryNo=%d';
  ErrorAEmptySQLStatement = 'No SQL statement available';
  ErrorACircularDataLink = 'Circular datalinks are not allowed';
  ErrorANotReleasedPageIsAllocated = 'Page allocation not released';
  ErrorAInvalidPage = 'Invalid page type. Possible data corruption';
  ErrorAInvalidPageType = 'Invalid page type. Possible data corruption. Expecting type %d, but found %d';
  ErrorAInvalidPageBuffer = 'Invalid page buffer. Buffer is Nil';
  ErrorAInvalidPageNo = 'Invalid page number';
  ErrorAInvalidPageModification = 'Invalid page modification';
  ErrorAUsedPageWasReleased = 'Used page was released too early';
  ErrorACannotRemoveUsedPage = 'Cannot remove used page';
  ErrorACannotWriteUsedPage = 'Cannot write used page';
  ErrorASomePagesAreNotReleased = 'Some session pages not released';
  ErrorACannotFindIndexField = 'Cannot find index field ''%s''';
  ErrorACannotIndexBlobField = 'Cannot index BLOB field ''%s''. Direct indexing of BLOB fields is not supported yet, please use CAST(blob_field, string) function to convert BLOB field to a string expression before indexing.';
  ErrorAInvalidIndexName = 'Invalid index name ''%s''';
  ErrorAInvalidIndexKeyPath = 'Invalid index key path';
  ErrorAInvalidIndexGetRecordMode = 'Invalid ''get record'' mode for index: grmCurrent';
  ErrorABufferSizeExceeded = 'Buffer size exceeded';
  ErrorAInvalidIndexForSearch = 'Invalid index for search';
  ErrorAInvalidIndexOfNo = 'Invalid index No (IndexOf)';
  ErrorACannotRetreiveRecordFromEmptyIndex = 'Cannot retrieve record from empty index';
  ErrorACannotSetRecNoGreaterThanRecordCount = 'Cannot set RecNo greater than RecordCount';
  ErrorAInvalidIndexPage = 'Invalid index page';
  ErrorAPageIsUsedByOtherSession = 'Page is used by other session';
  ErrorADatabaseAlreadyOpen = 'Cannot create database. Database is already open';
  ErrorACannotUnlockSessionsFile = 'Cannot unlock sessions file';
  ErrorACannotConnectSession = 'Cannot connect session. Maximum connections quantity exceeded or database is open in single-user mode';
  ErrorACannotDisconnectSession = 'Cannot disconnect session';
  ErrorAUncommitedPages = 'Cannot free non-committed pages';
  ErrorACannotAddItemOnPage = 'Cannot add data item to page. Page is full';
  ErrorACannotAddRecordOnPage = 'Cannot add record to page. Page is full';
  ErrorACannotAddBlob = 'Cannot add blob. Page is full: BlobCount=%d, BlobOffset=%d, BlobSize=%d, PageDataSize=%d, SizeInBlobPageIndex=%d';
  ErrorATableNotFound = 'Table ''%s'' not found';
  ErrorAInvalidNumberOfRecordsOnPage = 'Invalid number of records on page';
  ErrorARecordNotFound = 'Record not found';
  ErrorARecordNotFoundOnSmallRecordPage = 'Record not found. PageNo=%d, PageRecordCount=%d';
  ErrorABlobCacheNotReleased = 'Blob cache not released';
  ErrorAAutoincMaxValueExceeded = 'Autoinc max value exceeded for field ''%s''';
  ErrorACannotReadBlobValue = 'Cannot read BLOB field value';
  ErrorAInvalidPageUseCount = 'Page usage counter is negative';
  ErrorAInvalidTableHeaderData = 'Invalid table header data';
  ErrorADeleteFromArray = 'TSortedPageList.Delete - no elements in array!';
  ErrorADeleteFromArrayNotFound = 'TSortedPageList.Delete - element not found, key = %d, itemCount = %d';
  ErrorAPageNotFound = 'Page not found';
  ErrorACannotFindBlob = 'Cannot find blob field';
  ErrorACannotRetreiveRecord = 'Cannot retrieve record for index';
  ErrorAInvalidBlobFieldID = 'Invalid blob field ID';
  ErrorAInvalidBlobFieldSize = 'Invalid blob field size';
  ErrorATooLargeRecord = 'Cannot create table. Record is too large to fit in current database page. Please increase page size of database file or decrease record size';
  ErrorADatabaseInTransaction = 'Cannot perform ''%s'' operation on a database in a transaction';
  ErrorADatabaseIsNotInTransaction = 'Database is not within a transaction. Cannot perform operation';
  ErrorAInvalidSessionID = 'Invalid Session ID';
  ErrorATableFileCompression = 'Table file compression error';
  ErrorATableFileDecompression = 'Table file decompression error. Possible table corruption (%s)';
  ErrorAIndexByNameNotFound = 'Index ''%s'' not found';
  ErrorADatabaseFileIsModifiedByExternalApp = 'Cannot write changes. Database file was modified by an external application';
  ErrorACopyTableProblem = 'Problem occured while copying table ''%s'': ''%s''';
  ErrorACannotSetTableLock = 'Cannot set table lock. Try to repair the database or increase number of allowed connections';
  ErrorATableIsStillLocked = 'Some table locks still exist';
  ErrorACannotRemoveLock = 'Cannot remove table lock. Lock not found';
  ErrorAFailedToSetTableLock = 'Cannot set table lock';
  ErrorAFailedToUnlockTable = 'Cannot unlock table';
  ErrorAFailedToSetRecordLock = 'Cannot lock record';
  ErrorAFailedToUnlockRecord = 'Cannot unlock record';
  ErrorACannotDeleteOpenedTable = 'Cannot delete table ''%s''. Table is open by another user';
  ErrorACannotOpenTableInExclusiveMode = 'Cannot access table ''%s'' in exclusive mode. Table is open by another user';
  ErrorACannotReopenTableInExclusiveMode = 'Cannot access table ''%s'' in exclusive mode. Table is open by other cursors';
  ErrorACannotOpenLockedTable = 'Cannot open table ''%s''. Table is locked';
  ErrorADatabaseTablesLocked = 'Database tables are locked';
  ErrorADatabaseLocked = 'Database is locked';
  ErrorACannotUnlockDatabaseTables = 'Cannot unlock database tables';
  ErrorATableLocked = 'Table is locked';
  ErrorARecordLocked = 'Record is locked';
  ErrorACommitLocksFailed = 'Cannot commit changes. Locks of modified tables failed';
  ErrorAMultiUserOptionsConflict = 'Cannot open database in multi-user and signle-user mode at the same time';
  ErrorAImportingIndex = 'Cannot import index ''%s''. Index type is not supported, index skipped';
  ErrorAInvalidDatabaseFormat = 'Invalid database format';
  ErrorAInvalidDirtyPage = 'Invalid page';
  ErrorAConvertDatabase = 'Cannot convert database to the new format. Please contact support@componentace.com with this issue';
  ErrorADatabaseAlreadyInTransaction = 'Database is already within a transaction';
  ErrorAInvalidFieldNumberInOrderBy = 'Invalid field number in ORDER BY clause: %d';
  ErorrANotApplicableHavingCondition = '''Having'' condition is not applicable';
  ErrorAInvalidGroupByField = 'Invalid field for ''GROUP BY.'' Table name = ''%s'', FieldName = ''%s'', i = %d, FieldExists = %d';
  ErrorASubqueryMustHaveOneField = 'Subquery must have only one result field, but subquery''s FieldCount=%d';
  ErrorASubqueryMustHaveOneRow = 'Subquery must have only one row';
  ErrorASubqueryMustHaveOneRowButEmpty = 'Subquery must have one row, but it contains 0 rows';
  ErrorAUnicodeNotSupported = 'Unicode is not supported by your version of  Windows. Please download the Microsoft Layer for Unicode on Windows 95/98/Me Systems from msdn.microsoft.com and put "unicows.dll" file to the folder with your application';
  ErrorGCannotCreateTableWithBlobField = 'Invalid BlobCompressionMode (must be in 1..9 range) for blob field ''%s''. Cannot create table ''%s''';
  ErrorGMissingFieldName = 'Missing field name. FieldNo=%d, table ''%s''';
  ErrorANoKeyIndex = 'No active index is set for Key search. Set Table.IndexName to the index on search fields.';
  ErrorAInvalidNumberOfFieldValues = 'Number of field names does not equal the number of field values: %d <> %d. Found at line %d, column %d';
  ErrorAEndOfCommandExpected = 'End of SQL command expected, but ''%s'' found at line %d, column %d';
  ErrorACommaExpected = 'comma (",") expected but not found at line %d, column %d';
  ErrorAImportTableCannotSetDefaultValuesForTableFields = 'Cannot set default values for imported fields. Default values are ignored.';
  ErrorAExpressionCouldNotBeUsedInGroupBy = 'Expression (Name="%s", DisplayName="%s") cannot be used with GROUP BY. Possibly expression is not aggregate, but it uses fields not included into group fields';
  ErrorANotApplicableOnCondition = 'ON condition for JOIN is not applicable';
  ErrorAParameterOfUnknownType = 'Parameter "%s" is of an unknown data type';
  ErrorAIntoClauseInUnionSelect = 'UNION subselect cannot contain INTO caluse. Use SELECT * INTO table FROM (select ... union select ...) instead';
  ErrorALocateFailedDatasetClosed = 'Cannot perform LOCATE on a closed dataset';
  ErrorAInvalidMaxConnectionsValue = 'MaxConnections value must be positive ( >= 0)';
  ErrorACoalesceArgumentsMissed = 'COALESCE arguments are missing at line %d, column %d';
  ErrorADateStringExpected = 'Date string expected "YYYY-MM-DD", but found "%s" at line %d, column %d';
  ErrorATimeStringExpected = 'Time string expected "HH:MM:SS", but found "%s" at line %d, column %d';
  ErrorAInvalidRecordPageIndexOrMostUpdated = 'Invalid table RecordPageIndex or MostUpdated. RecordPageIndex.RecordCount=%d, MostUpdated.RecordCount=%d';
  ErrorAInvalidEscapeCharacter = 'Invalid escape character length (should be a single character) at line %d, column %d';
  ErrorACannotCopyTableNoFieldObject = 'Cannot copy table "%s". Field object for field "%s" is not created.';
  ErrorAInvalidDBPassword = 'Database password is invalid.';
  ErrorAErrorReadingPage = 'Error reading database file page. Page No: %d, type %d';
  ErrorACannotFindNthPage = 'Error getting %d-th table file page. Probably database is corrupted and needs repair.';
  ErrorANotEnoughFreeSpace = 'There is not enough free space on drive to perform required operation with the database file.';
