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.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 07cdf95d7b44..acc2059f15c7 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FStatement.cxx,v $
- * $Revision: 1.44.56.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -497,13 +494,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);