// --------------------------------------------------------------------------------------------------------
private void validateUnparseable()
{
// The "unparseable" query should be indeed be unparseable by OOo (though a valid HSQL query)
XSingleSelectQueryComposer composer = null;
QueryDefinition unparseableQuery = null;
try
{
XMultiServiceFactory factory = (XMultiServiceFactory)UnoRuntime.queryInterface(
XMultiServiceFactory.class, m_database.defaultConnection() );
composer = (XSingleSelectQueryComposer)UnoRuntime.queryInterface(
XSingleSelectQueryComposer.class, factory.createInstance( "com.sun.star.sdb.SingleSelectQueryComposer" ) );
unparseableQuery = m_dataSource.getQueryDefinition( "unparseable" );
}
catch( Exception e )
{
throw new RuntimeException( "caught an unexpected exception: " + e.getMessage() );
}
boolean caughtExpected = false;
try
{
composer.setQuery( unparseableQuery.getCommand() );
}
catch (WrappedTargetException e) { }
catch( SQLException e )
{
caughtExpected = true;