RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DataStoreErrorCode Class

Symbolic error codes for Blackfish SQL database.

Pascal
DataStoreErrorCode = class;
C++
class DataStoreErrorCode;

DataStoreErrorCode.cs

DataStoreErrorCode provides symbolic error codes for the Blackfish SQL database. 

This table contains error codes.

Constant 
Description 
Undefined error.  
Could not find any updatable columns when saving dataset data.  
Cannot find column with given column name.  
Attempt to add column with same name, but different data type as existing DataColumn.  
Column position is out of range.  
Column already bound to a DataSet. Use (Column)Column.clone() to add this column.  
Cannot change column data type because associated column already has data.  
Unknown data type.  
Cannot be saved. No updatable columns have a table name.  
Partial search option can only be used when last column searched on is of String type".  
Must specify one of First, Last, Next or Prior Locate for locate operations.  
The number and data type of columns in the DataSet MasterLinkColumns and DetailLinkColumns must match.  
Operation failed. DataSet structurally corrupt.  
Duplicate column name.  
DataSet has no unique row identifiers and is not updatable.  
Operation cannot be performed on an open DataSet. Close the DataSet first.  
Operation failed. DataSet is not open.  
Chained exception. To access the lower level exception(s) call getExceptionChain. Also, printStackTrace displays all exceptions in the chain.  
Operation failed. Attempt to sort on non sortable column, i.e. BinaryColumn.  
Trying to perform an operation that requires a column name without having specified one.  
DataSet changes are currently being saved. Retry operation later.  
Column formatting error for default, minimum, maximum values using edit mask or display format.  
Attempting to read twice from a java.io.InputStream implementation that throws an exception when InputStream.reset is called and InputStream.available returns 0 bytes. To correct this, use an InputStream implementation that supports reset.  
DataSet.refetchRow was called with insufficient row id.  
DataSet.refetchRow was called with non existent row id  
Current DataSet does not refetchRow  
Operation failed due to an IO error.  
Occurs when a DataSet requests that a data aware control post field values being edited and the field value cannot be posted (most likely due to a validation error). Unfortunately controls do not currently provide any information on why a post failed.  
Class could not be found during deserialization process.  
Store property setting is read-only.  
Execution of procedure failed.  
The storeName (storage name) property must be one or more characters in length.  
Prevents write access if StorageDataSet.CalcListener or StorageDataSet.AggCalcListener have not been set on a StorageDataSet component.
Should only occur with StorageDataSets that use DataStore for a backing store. DataStore persists the class names of calc listeners. Thus if a StorageDataSet component opens without specifying a StorageDataSet.CalcListener or StorageDataSet.AggCalcListener that were used previously, the StorageDataSet is marked read-only.
To correct,

  1. add the appropriate listeners, or
  2. call StorageDataSet.recalc

 

Attempt to specify different primary key when one already exists.  
Attempt to specify primary Sort without specifying any sortKey columns.  
Sort as inserted not supported with descending sort orders.  
No keys specified to create index for SortDescriptor  
There can only be one autoincrement column in a table.  
This constraint name does not exist.  
Attempting to assign a value to a read-only column.  
Attempting to assign a value to a read-only table.  
Value entered for column is less than the column min property.  
Value entered for column is greater than the column max property.  
String values for this column cannot exceed the precision length set in the Column.precision property. This property can be implicitly set when data is retrieved from a provider. If data is being provided from a JDBC driver, the precision specified by the JDBC result set is propagated to the Column.precision property. This propagation can be overridden by explicitly setting the Column.precision property.  
Cannot parse value or generic format error.  
No rows to delete.  
Row insertion not allowed.  
Row editing not allowed.  
Row deleting not allowed.  
The key value is a duplicate.  
Violation of foreign key constraint has occurred.  
Violation of foreign key constraint definition error.  
Could not add constraint because a unique or foreign key constraint already exists with that name.  
Operation failed. StoreName property for Table component not set.  
Operation failed. Attempt to add duplicate key value. This is different than ValidationException.DUPLICATE_KEY error. This error is an internal unexpected key violation, not unique constraint.  
Max row size exceeded.
Too many columns and/or high Column.MaxInline properties used. There are two ways to remedy this problem: 1) set Column.MaxInline property for columns with data types of Variant.STRING, Variant.INPUTSTREAM or Variant.OBJECT to a value less than 16. By default, the maximum inline storage for such fields does not go below 16 unless the Column.MaxInline property is set lower. 2) Create your DataStore with a larger block size by setting the DataStore.BlockSize property.  
Attempt to open table with a StorageDataSet that has a different set of columns.  
Cannot restructure when table is opened by more than one StorageDataSet.  
Column is new or its data type has changed. Restructure the DataSet with DataSet.setRestructure(false);  
Operation failed. DataStore not open.  
DataStore not found by DataStore.storeExists method or DataStoreConnection.FileName property is null.  
File specified by DataStore.FileName property does not appear to be a valid DataStore file. File signature or size is invalid.  
Previous update failed. Shut down and reopen the DataStore.  
Unexpected internal condition. call DataStore.shutDown and then DataStore.open.  
Name of storage file or table being added, undeleted, or renamed is not unique.  
Unexpected internal condition. Operation not supported on this stream.  
ResponseEventoccurred. If DataStore.ResponseListener does not exist or file is not deleted by ResponseListener, an IOException is thrown. This element is deprecated.  
Operation failed. Operation cannot be performed on an opened DataStore.  
Error writing to DataStore. Unexpected cache block contents.  
Error reading from DataStore. Unexpected block contents.  
AggOperator class could not be loaded. The class is probably not in the classpath.  
Operation canceled. Used for canceling long running operations such as sorting or restructuring.  
Restructure operation is converting from one data type to another. Old values are not converted to new data type.  
Restructure operation is converting from one data type to another. Type conversion may result in precision loss when values of old data type are converted to values of new data type.  
Restructure operation is converting from one data type to another. One or more parse errors occurred converting a String data type to a non String data type.  
Precision of BigDecimal exceeded.  
DataStore is already opened by another process.  
InputStream from a DataStore has been closed and is no longer accessible.  
Can't create or delete a stream that is still open.  
Use CANT_CREATE_OPEN_STREAM This element is deprecated.  
Stream not found in DataStore.  
See STREAM_NOT_FOUND This element is deprecated.  
DataStore cannot be opened because it was created by a newer a version of the DataStore component.  
Cannot create a file stream with the same name as an existing table stream.  
Cannot create a DataSet stream with the same name as an existing file.  
Unexpected condition. Internal row not found.  
Too many errors detected by the stream verifier.  
Write operation failed. The DataStore is read-only.  
Cannot perform operation on DataStore because it was created with an older version of DataStore. To upgrade the DataStore file, use DataStoreConnection.copyStreams.  
Column.MaxInline property setting is too small.  
An attempt to create a unique index failed, because the table had duplicate row values for the given column combination.  
Invalid escape sequence in String pattern at character offset. Escape character of '\' can only precede '*', '?' or '\' characters.  
Incompatible DataStore.BlockSize property for copyStream operation. If copying between two DataStores, both DataStores must currently have the same DataStore.BlockSize property setting.  
Could not create a lock dir for DataStore file. Make sure the DataStore file exists and that you have permission to create a subdirectory.  
Same as CannotOpen.  
Cannot open DataSet because it has invalid directory attributes.  
DataStore is unlicensed.  
Connection count exceeded for DataStore license.  
Security error.  
Invalid Savepoint. Savepoint is out of date or was created for a different connection.  
An attempt was made to create a Java Method that already exists.  
An attempt was made to drop or reference a Java Method that doesn't exist.  
The class of a Java Method is missing from the classpath.  
The class of a Java Method does not contain any methods matching its definition.  
This class of a Java Method has conflicting definitions for this method.  
This table or view cannot be dropped because it has a dependent view.  
This table cannot be dropped because it appears in a foreign key.  
This schema cannot be dropped because it still has tables, views, or methods.  
This privilege or role revoke cannot be performed because a dependent view exists.  
This privilege or role revoke cannot be performed because a dependent foreign key exists.  
This privilege or role revoke cannot be performed because a dependent privilege exists.  
An attempt was made to reference a table that doesn't exist.  
This role cannot be dropped because it is granted to a user or a role.  
An error occurred in the management of fail safe mirrors.  
DataStore server could not be started. This usually occurs because the port is in use by another process.  
The functionality invoked can only be used in database files. Consult the documentation for alternative functionality.  
An ALTER VIEW would result in a cyclic view definition where the view depends on it own definition. This is illegal.  
An Error occurred processing a DB_ADMIN stored procedure call.  
Unexpected time-out constructing a transactionally consistent read only view of the database.  
Desktop license can only connect to localhost or 127.0.0.1 host name.  
The ResultSet is positioned after the last result row. It is an error to access columns in this state.  
A SQL aggregate function such as COUNT, SUM, AVG, MIN or MAX was found in an improper context. These functions may only appear in certain expressions in a SELECT expression: In the select list and in a HAVING clause.  
The type of a SQL parameter marker cannot be identified by the surrounding operators. Use the CAST function to identify the type, eg.
CAST ( ? AS DATE ).  
A column index is out of range. Note: In JDBC, these indices are 1 based.  
An invalid FETCH direction was given.  
An invalid FETCH size was specified.  
An invalid maximum field size was specified. This number must be non negative.  
An invalid number for maximum wanted rows in a ResultSet was specified. This number must be non negative.  
An invalid ordinal was specified in an ORDER BY clause or GROUP BY of a SELECT statement. ORDER BY 1 means sort in the order of the first output column etc.  
BadUrl  
An invalid connection URL was given for the database.  
The ResultSet is positioned before the first result row. It is an error to access columns in this state.  
An assignment was attempted with a value of the wrong type. This can be a DEFAULT value of a column, or an INSERT or UPDATE statement.  
A cast from one type to another type was impossible.  
An INTERNALROW column cannot be set from an INSERT or UPDATE statement. This column is a pseudo column and is maintained by the database system.  
A VIEW cannot be altered in an ALTER statement. Instead DROP the view and redefine it.  
A column name listed in a USING clause of a table JOIN does not exist in the left table expression.  
A column name listed in a USING clause of a table JOIN does not exist in the right table expression.  
A column name is specified twice in the column list for the INSERT statement, i.e. two values are given for the same column.  
An attempt has been made to use a connection that was closed earlier.  
A connection error was encountered. Read the message string for details.  
The table expression cannot be evaluated because the two tables involved have a different column count.  
The SQL statement could not be parsed. Check the syntax and correct the error. Notice the column information in the error message.  
A divide by zero occurred during execution of SQL statement.  
The SQL statement could not be parsed. Note only one statement can be can be parsed and executed at a time.  
This feature is not supported by the current driver.  
The maximum FLOAT precision supported is 52 bits.  
This is a FORWARD_ONLY cursor. Therefore next is the only valid navigation method for this cursor.  
The executeUpdate method was called to execute a SQL query, which produced a ResultSet. Use executeQuery instead, or if the nature of the query is unknown, use execute.  
Catalogs are not supported.  
This character cannot be part of a SQL syntax unless it appears in quotes.  
Syntax error in SQL. The parser expects an expression, but does not recognize this symbol as the start of an expression.  
The table expression cannot be evaluated because the two tables involved have a different column type for the column index mentioned in error message.  
A type mismatch was found for the given operator.  
An index with this name has already been created.  
An internal error has happened. Please submit the exception and, if possible, a reproducible test case to CodeGear.  
A SQL aggregate function such as COUNT, SUM, AVG, MIN or MAX was found with an invalid expression argument. If such an argument expression has multiple column references, those column references must all be part of the same SELECT expression. It is an illegal aggregate expression if there is a mix of inner and outer column references.  
The binary string contains non binary characters. The valid repertoires are: B'01' and X'0123456789abcdef' or X'0123456789ABCDEF'.  
The named column was not found in the current scope.  
The dot "." separated column syntax was used more than 4 levels deep. That syntax is only recognized for 4 levels: catalog.schema.table.column.  
The string for the escape character in a LIKE operator evaluated to a string that was not exactly one character long.  
The extract field for the EXTRACT function was incorrect. Check the syntax.  
The specified index does not exist on the specified table.  
The pattern string in a LIKE operator did not evaluate to a valid pattern string.  
The dot "." separated column syntax was used more than 3 levels deep. That syntax for a table only recognizes 3 levels: catalog.schema.table.  
The named table was not found as a VIEW or TABLE.  
The string for the trim character of the TRIM function evaluated to a string that was not exactly one character long.  
The view was invalidated by changes to a parent table.  
An invalid JOIN expression was given. A JOIN expression must have at least one of the following specifiers: NATURAL, UNION, CROSS, ON or USING.  
An connection related problem occurred during the execution of this operation.  
A protocol error was found during execution of this operation. The connection between client and server may be unstable.  
Delete and update operations cannot happen while editing the special driver insert row.  
The given date or time string did not represent a date or a time.  
The given decimal value is not properly formatted.  
The given floating point value is not properly formatted.  
A parameter mismatch was found for the stored procedure.  
No such method was found in the database.  
The number of insert values doesn't match the number needed for the INSERT statement.  
The number of columns in the column list doesn't match the number of columns in the table expression.  
The number of output parameters doesn't match the number of output columns in this single row SELECT query.  
A scalar subquery resulted in a ResultSet with more than one row.  
This subquery resulted in a ResultSet with more than one column, which is not valid in current context.  
The argument to the SQRT function is negative.  
The length argument to the SUBSTRING function is negative  
Nested aggregator functions such as COUNT, SUM, AVG, MIN or MAX is not valid.  
This column must be in the GROUP BY clause or appear inside an aggregate function.  
The connection should not be opened in read only mode, because it is already open in read-write mode.  
The query that was executed with executeQuery did not yield a ResultSet.  
A remote connection could not be made because database server was not found.  
An attempt was made to set or get from a parameter that doesn't exist in the query.  
No DEFAULT value is accepted for binary columns.  
A NULL value was passed for a parameter that does not accept NULL values. Correct the parameter or change the store procedure to accept NULL values by using non primitive data types in Java, i.e. use java.lang.Integer instead of int, and so on.  
The data store is not transactional, and therefore cannot be opened through a SQL based driver.  
An attempt was made to register this parameter as an output parameter, however the parameter does not represent an output parameter in the SQL query.  
Inserts in driver can only happen from special driver insert row.  
An attempt to update current ResultSet was made. However the query that was run was not an updatable query.  
The connection should not be opened in read- write mode, because it is already open in read-only mode.  
A floating point operation yielded a numeric overflow value.  
A floating point operation yielded a numeric underflow value.  
An output parameter is required at this position, because the stored procedure is an in-out parameter.  
This input parameter was not set to a value prior to executing the query.  
Cannot mix system and object privileges.  
An incompatible version of driver client and server was used.  
An attempt was made to update a read-only column.  
A column was renamed twice in the same ALTER TABLE statement.  
An attempt was made to access a closed ResultSet.  
A single row SELECT statement yielded more than one1 row.  
An attempt was made to access a closed statement.  
A string was too large to transport over the wire from the client to the database server.  
A table or a view already exists with that name.  
An invalid JOIN expression was given. A JOIN expression cannot have more than one of the following specifiers: NATURAL, UNION, CROSS, ON or USING.  
An unrecognized data type was found in the SQL query.  
An unclosed comment was found.  
An unclosed quoted identifier was found.  
An unclosed string literal was found.  
A column name was not found in the ResultSet.  
An unrecognized escape sequence or escape function was found.  
An attempt to update a non updatable VIEW was made.  
An insert or an update was made to a row in a view, which caused that row to be filtered out of that view.  
A method call was attempted that caused an IllegalAccessException. Check if the method is public and static and is the class public.  
A function that takes an integer argument was given a numeric parameter with significant decimal digits.  
A function is overloaded with different parameter names, so it cannot be called using named parameters.  
A create schema must be run by the owner of that schema.  
If present, the schema name of an object created in a CREATE SCHEMA statement must match that schema.  
A view operation was attempted on a table, or a table operation was attempted on a view.  
An error occurred during syntax or semantic check of query.  
An error happened during run of query.  
An error occurred attempting to fail over to another server.  
The SQL parameters must be accessed by either name or ordinal. Mixing these access methods is not supported.  
A reference to an unknown SQL parameter name was made.  
Connection time-out waiting for an available connection in the connection pool.  
The connection pool was closed while waiting for an available connection.  
Unspported dbExpress data type from TDBXDataTypes class.  
If the StorageDataSet.MaxResolveErrors property is set, a ResolutionException with this error code is thrown when the maximum errors are encountered. The resolution process is aborted (i.e. changes are rolled back).  
If the StorageDataSet.MaxResolveErrors property is set, a ResolutionException with this error code is thrown when all rows have been processed. Any successfully processed rows will be committed.  
Existing log files and/or log anchor file found in the directory where the system is attempting to create new log files.  
'B' log directory specified without specifying 'A' log directory. The 'A' log directory must be specified. 'B' log directory is an optional duplexing of the 'B' log.  
'A' and 'B' log directories specified for DataStore, but one of them does not exist. The log files must both exist or both not exist. This ensures that the duplexed logs are in sync.  
Persistent DataStore log directory setting contradicts TxManager log directory setting and the persistent DataStore log directory still contains log files. If the log files were copied to the new directory specified by the TxManager, the log files in the old location (persisted in the DataStore file) must be renamed or deleted.  
Anchor file has an invalid length. It is probably corrupt, but this should be a rare error, since the previous anchor is copied to at least two separate files. The system redundantly copies this anchor inside the DataStore file itself, so this could be a recoverable failure. Log duplexing is another way to recover from such a failure. If the log is being duplexed (by setting the TxManager.BLogDir property), the A and B anchors are examined and the newest, valid anchor is used.  
Anchor file could not be read or has an invalid contents. It is probably corrupt, but this should be a rare error, since the previous anchor is copied to at least two separate files. The system redundantly copies this anchor inside the DataStore file itself, so this could be a recoverable failure. Log duplexing is another way to recover from such a failure. If the log is being duplexed (by setting the TxManager.BLogDir property), The A and B anchors are examined and the newest, valid anchor is used.  
Birthstamp for "A" anchor file and "B" anchor file do not match. This probably means that the log files were not created for the same DataStore file.  
Anchor timestamp is older then timestamp of DataStore file. This is probably because the log files are out of date with the DataStore file.  
Too many simultaneous open files by log manager. This should not occur, but if it does, shut down and restart the system.  
Invalid user name for DataStoreConnection.UserName property. Typically caused when the property has never been set.  
Attempted transactional operation when its associated DataStore.TransacitonMan property is null.  
Unexpected internal condition. Invalid address into a log file.  
Missing log file.  
Missing checkpoint log file.  
Attempt to use a TxManager component instance for two different DataStores.  
This connection cannot be opened because the DataStore is not transactional or read-only.
This error can be corrected by setting the DataStore.ReadOnly property to true or by setting the DataStore.TxManager property to a non-null TxManager instance. the DataStore JDBC driver can only open connections to transactional or read-only DataStores. Once a DataStore component is opened with the TxManager property set, the DataStore file is marked transactional and all TxManager properties are persisted in the DataStore file. This operation only needs to be performed once.  
Can't make this DataStore transactional because it is an older file format.  
Recovery denied by ResponseListener event handler. To prevent this exception and allow recovery to complete, do not deny this event in your application's ResponseListener handler.  
ActionComplete  
Do not document or make public. Used internally during recovery.  
Time-out waiting for lock. This can be caused by a deadlock scenario or because a connection with a lock is taking a long time to commit the transaction that has acquired a lock.  
OldLog  
Log file appears to be older than the DataStore it is associated with. This may be caused by copying old log files to the directory of a DataStore database file that has more recent changes. You can open the DataStore in read-only mode (see DataStoreConnection.setReadOnly) and copy its contents (see DataStoreConnection.copyStreams) to set up new log files.  
Time-out waiting for row lock. This can be caused by a deadlock scenario or because a connection with a lock is taking a long time to commit the transaction that has acquired a lock.  
Prepared XA transaction needs to be committed or rolled back.  
Two or more connections have transactions that are acquiring two or more record and/or table locks in an opposite order.
Here are some typical scenarios.
Read/write access when updating a row. When a transaction reads a row, a share lock is acquired. If the transaction writes to the same row, an exclusive lock must be acquired to update the same row. Share locks can be held by more than one transaction for the same row, but exclusive locks can only be held by one transaction. So if transaction t1 and t2 first acquire a share lock for row 3 and then both try to acquire an exclusive row lock for the same row, a dead lock occurs, because neither transaction can acquire an exclusive lock for the row that they both have share locks on. The most typical solution for this problem is to use the FOR UPDATE clause when executing SQL SELECT statements for rows that are modified or deleted.
Table lock escalation. If more than one thread acquires more than the maximum number of row locks for a table, a deadlock can occur. This is because a shared table lock that prevents exclusive table locks is acquired before row locks are acquired. When the lock manager decides to acquire an exclusive table lock because maximum row locks setting has been exceeded, a dead lock can occur if other transactions are also attempting the same escalation. This is because more than one transaction has a shared lock for the same table they are also trying to get exclusive locks for. Possible solutions include: 1) catch the deadlock exception and retry the operation. These exceptions are typically detected very quickly and automatically rollback the transaction. 2) Use a higher setting for the maxRowLocks property setting.
Use short-duration write transactions. Connections should try to use short-duration transactions in high concurrency environments. However, in low- or no-concurrency environments, a long-duration transaction can provide better throughput, since fewer commit requests are made. There is a significant overhead to the commit operation, because it must guarantee the durability of a transaction.
Using read-only transactions for transactions that do not perform write operations. Read-only transactions aren't blocked by writers or other readers, and because they don't acquire locks, they never block other transactions. To make JDBC connections use read-only transactions, set the readOnly property of the java.sql.Connection object (returned by the java.sql.DriverManager.getConnection and com.borland.dx.sql.dataset.Database.getJdbcConnection methods) to true. When using DataStoreConnection objects, set the readOnlyTx property to true before opening the connection. Read-only transactions work by simulating a snapshot of the database. The snapshot sees only data from transactions that are committed at the point the read-only transaction starts; otherwise, the connection would have to see if there were pending changes and roll them back whenever it accessed the data. A snapshot begins when the DataStoreConnection opens. It is refreshed every time the commit method is called.
See also com.borland.datastore.driver.cons.ExtendedProperties.MAX_ROW_LOCKS.  
Prepared XA transaction needs to be committed or rolled back.  
Operation cannot be completed because transaction already started.  
Physical undo needed. Try DataStoreConnection.setTableLockTables(new String[]) first.  
Read-only transaction could not start because connection with modifications to the database has not committed.  

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!