<html> <head> <title>Constants' Group ErrorCondition</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../../idl.css"> </head> <body> <div id="adc-idlref"> <a name="_top_"> </a><table class="navimain" border="0" cellpadding="3"> <tr> <td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td> <td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td> <td class="navimainnone">Use</td> <td class="navimainnone">Devguide</td> <td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td> </tr> </table> <table class="navisub" border="0" cellpadding="0"> <tr> <td class="navisub"><a href="#Constants" class="navisub">Constants</a></td> <td class="navisub"><a href="#ConstantDetails" class="navisub">Constants' Details</a></td> </tr> </table> <hr> <table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;"> <tr> <td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">sdb</a> :: </p> </td> </tr> <tr> <td class="title"><table class="title-table" width="99%"> <tr> <td width="25%" class="title2">unpublished </td> <td width="50%" class="title">constants group ErrorCondition</td> <td width="*"/></tr> </table> </td> </tr> <tr> <td><dl> <dt><b>Description</b></dt> <dd>defines error conditions for OpenOffice.org Base core components </dd> <dd><p>Core components of OpenOffice.org will use those error conditions as error codes (::com::sun::star::<a href="../sdbc/module-ix.html">sdbc</a>::<a href="../sdbc/SQLException.html">SQLException</a>::<a href="../sdbc/SQLException.html#ErrorCode">ErrorCode</a>) whereever possible.<br/> That is, if an <code>SQLException</code> is raised by such a component, caused by an error condition which is included in the <a href="ErrorCondition.html">ErrorCondition</a> group, then the respective <em>negative</em> value will be used as <code>ErrorCode</code>.</p> <p>This allows to determine specific error conditions in your client code, and to handle it appropriately.</p> <p>Note that before you examine the <code>ErrorCode</code> member of a caught <code>SQLException</code>, 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 (<code>Exception::Message</code>) starts with the vendor string <code>[OOoBase]</code>.</p> <p>The list of defined error conditions, by nature, is expected to permanently grow, so never assume it being finalized.</p> </dd> <dt><b>Example</b></dt> <dd>Java <pre> catch ( SQLException e ) { if ( e.Message.startsWith( "[OOoBase]" ) ) if ( e.ErrorCode + ErrorCondition.SOME_ERROR_CONDITION == 0 ) handleSomeErrorCondition(); } </pre> </dd> </dl> </td> </tr> </table> <hr> <a name="Constants"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Constants</td> </tr> <tr> <td class="imsum_left"><a href="#ROW_SET_OPERATION_VETOED">ROW_SET_OPERATION_VETOED</a></td> <td class="imsum_right">is used by and <a href="RowSet.html">RowSet</a> to indicate that an operation has been vetoed by one of its approval listeners </td> </tr> <tr> <td class="imsum_left"><a href="#PARSER_CYCLIC_SUB_QUERIES">PARSER_CYCLIC_SUB_QUERIES</a></td> <td class="imsum_right">indicates that while parsing an SQL statement, cyclic sub queries have been detected. </td> </tr> <tr> <td class="imsum_left"><a href="#DB_OBJECT_NAME_WITH_SLASHES">DB_OBJECT_NAME_WITH_SLASHES</a></td> <td class="imsum_right">indicates that the name of a client side database object - a query, a form, or a report - contains one or more slashes, which is forbidden. </td> </tr> <tr> <td class="imsum_left"><a href="#DB_INVALID_SQL_NAME">DB_INVALID_SQL_NAME</a></td> <td class="imsum_right">indicates that an identifier is not SQL conform. </td> </tr> <tr> <td class="imsum_left"><a href="#DB_QUERY_NAME_WITH_QUOTES">DB_QUERY_NAME_WITH_QUOTES</a></td> <td class="imsum_right">indicates that the name of a query contains quote characters. </td> </tr> <tr> <td class="imsum_left"><a href="#DB_OBJECT_NAME_IS_USED">DB_OBJECT_NAME_IS_USED</a></td> <td class="imsum_right">indicates that an attempt was made to save a database object under a name which is already used in the database. </td> </tr> <tr> <td class="imsum_left"><a href="#DB_NOT_CONNECTED">DB_NOT_CONNECTED</a></td> <td class="imsum_right">indicates an operation was attempted which needs a connection to the database, which did not exist at that time. </td> </tr> </table> <a name="ConstantDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle">Constants' Details</td> </tr> <tr> <td class="imdetail"><a name="ROW_SET_OPERATION_VETOED" class="membertitle">ROW_SET_OPERATION_VETOED</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center"> <tr> <td>const long <b>ROW_SET_OPERATION_VETOED</b> = 100;<hr> <dl> <dt><b>Description</b></dt> <dd>is used by and <a href="RowSet.html">RowSet</a> to indicate that an operation has been vetoed by one of its approval listeners </dd> <dd><p>This error condition results in raising a <a href="RowSetVetoException.html">RowSetVetoException</a>.</p> </dd> <dt><b/></dt> <dd/><dt><b/></dt> <dd/><dt><b/></dt> <dd/></dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="PARSER_CYCLIC_SUB_QUERIES" class="membertitle">PARSER_CYCLIC_SUB_QUERIES</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center"> <tr> <td>const long <b>PARSER_CYCLIC_SUB_QUERIES</b> = 200;<hr> <dl> <dt><b>Description</b></dt> <dd>indicates that while parsing an SQL statement, cyclic sub queries have been detected. </dd> <dd><p>Imagine you have a client-side query <code>SELECT * FROM table</code>, which is saved as "query1". Additionally, there is a query "query2" defined as <code>SELECT * FROM query1</code>. Now if you try to change the statement of ::query1 to <code>SELECT * FROM query2</code>, this is prohibited, because it would lead to a cyclic sub query. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="DB_OBJECT_NAME_WITH_SLASHES" class="membertitle">DB_OBJECT_NAME_WITH_SLASHES</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center"> <tr> <td>const long <b>DB_OBJECT_NAME_WITH_SLASHES</b> = 300;<hr> <dl> <dt><b>Description</b></dt> <dd>indicates that the name of a client side database object - a query, a form, or a report - contains one or more slashes, which is forbidden. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="DB_INVALID_SQL_NAME" class="membertitle">DB_INVALID_SQL_NAME</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center"> <tr> <td>const long <b>DB_INVALID_SQL_NAME</b> = 301;<hr> <dl> <dt><b>Description</b></dt> <dd>indicates that an identifier is not SQL conform. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="DB_QUERY_NAME_WITH_QUOTES" class="membertitle">DB_QUERY_NAME_WITH_QUOTES</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center"> <tr> <td>const long <b>DB_QUERY_NAME_WITH_QUOTES</b> = 302;<hr> <dl> <dt><b>Description</b></dt> <dd>indicates that the name of a query contains quote characters. </dd> <dd><p>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 <code>SELECT</code> statements, where quote identifiers would render the statement invalid.</p> </dd> <dt><b/></dt> <dd/></dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="DB_OBJECT_NAME_IS_USED" class="membertitle">DB_OBJECT_NAME_IS_USED</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center"> <tr> <td>const long <b>DB_OBJECT_NAME_IS_USED</b> = 303;<hr> <dl> <dt><b>Description</b></dt> <dd>indicates that an attempt was made to save a database object under a name which is already used in the database. </dd> <dd><p>In databases which support query names to appear in <code>SELECT</code> statements, this could mean that a table was attempted to be saved with the name of an existing query, or vice versa.</p> <p>Otherwise, it means an object was attempted to be saved with the name of an already existing object of the same type.</p> </dd> <dt><b/></dt> <dd/><dt><b/></dt> <dd/></dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="DB_NOT_CONNECTED" class="membertitle">DB_NOT_CONNECTED</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center"> <tr> <td>const long <b>DB_NOT_CONNECTED</b> = 304;<hr> <dl> <dt><b>Description</b></dt> <dd>indicates an operation was attempted which needs a connection to the database, which did not exist at that time. </dd> </dl> </td> </tr> </table> </td> </tr> </table> <a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2009 Sun Microsystems, Inc.</p> </div> <!-- id="adc-idlref" --> </body> </html>