summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/file/FStatement.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/file/FStatement.cxx')
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 6d82486dae..652d41d886 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -497,13 +497,16 @@ void OStatement_Base::construct(const ::rtl::OUString& sql) throw(SQLException,
// SELECT statement without columns -> error
m_pConnection->throwGenericSQLException(STR_QUERY_NO_COLUMN,*this);
- if ( m_aSQLIterator.getStatementType() == SQL_STATEMENT_CREATE_TABLE )
- // CREATE TABLE is not supported at all
- m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,*this);
-
- if ( ( m_aSQLIterator.getStatementType() == SQL_STATEMENT_ODBC_CALL ) || ( m_aSQLIterator.getStatementType() == SQL_STATEMENT_UNKNOWN ) )
- // ODBC call or unknown statement type -> error
- m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,*this);
+ switch(m_aSQLIterator.getStatementType())
+ {
+ case SQL_STATEMENT_CREATE_TABLE:
+ case SQL_STATEMENT_ODBC_CALL:
+ case SQL_STATEMENT_UNKNOWN:
+ m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,*this);
+ break;
+ default:
+ break;
+ }
// at this moment we support only one table per select statement
Reference< ::com::sun::star::lang::XUnoTunnel> xTunnel(xTabs.begin()->second,UNO_QUERY);