defines error conditions for OpenOffice.org Base core components
Core components of OpenOffice.org will use those error conditions
as error codes (::com::sun::star::sdbc::SQLException::ErrorCode)
That is, if an SQLException is raised by
such a component, caused by an error condition which is included in the
ErrorCondition group, then the respective negative value
will be used as ErrorCode.
This allows to determine specific error conditions in your client code, and
to handle it appropriately.
Note that before you examine the ErrorCode member of a caught
SQLException, you need to make sure that the exception
is really thrown by an OpenOffice.org Base core component. To do so, check
whether the error message (Exception::Message) starts with the
vendor string [OOoBase].
The list of defined error conditions, by nature, is expected to permanently grow,
so never assume it being finalized.
catch ( SQLException e )
if ( e.Message.startsWith( "[OOoBase]" ) )
if ( e.ErrorCode + ErrorCondition.SOME_ERROR_CONDITION == 0 )
indicates that while parsing an SQL statement, cyclic sub queries have been detected.
Imagine you have a client-side query SELECT * FROM table, which is
saved as "query1". Additionally, there is a query "query2" defined
as SELECT * FROM query1. Now if you try to change the statement of
::query1 to SELECT * FROM query2, this is prohibited, because
it would lead to a cyclic sub query.
indicates that the name of a query contains quote characters.
This error condition is met when the user attempts to save a query
with a name which contains one of the possible database quote characters.
This is an error since query names can potentially be used in
SELECT statements, where quote identifiers would render the statement invalid.
used to indicate that a SELECT operation on a table needs a filter.
Some database drivers are not able to SELECT from a table if the
statement does not contain a WHERE clause. In this case, a statement
like SELECT * FROM "table" with fail with the error code
It is also legitimate for the driver to report this error condition as warning, and provide
an empty result set, instead of ungracefull failing.
Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation.
The Apache feather logo is a trademark of The Apache Software Foundation.
Other names appearing on the site may be trademarks of their respective owners.