summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-04-10 07:03:36 +0000
committerOcke Janssen <oj@openoffice.org>2001-04-10 07:03:36 +0000
commit96369461fbce4de67eb68fd1aa8fe8efde9b4760 (patch)
tree48d5d5e50ae246fe4737fcedafee27d9032950e9 /connectivity
parent462a4731a0c6b6a360ce1d033eb3c58910c53f1b (diff)
#85891# check if columnname is known
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 834ea8cc8d96..fd9dfcd16baf 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fcomp.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-02-12 10:49:13 $
+ * last change: $Author: oj $ $Date: 2001-04-10 08:03:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,6 +77,10 @@
#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include "connectivity/dbexception.hxx"
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE file
+#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
+#include "propertyids.hxx"
+#endif
using namespace connectivity;
using namespace connectivity::file;
@@ -423,6 +427,12 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr
aColumnName = pPredicateNode->getChild(2)->getTokenValue();
}
+ if(!m_orgColumns->hasByName(aColumnName))
+ {
+ ::rtl::OUString sMsg = ::rtl::OUString::createFromAscii("Column not found: ");
+ sMsg += aColumnName;
+ throw SQLException(sMsg,NULL,SQLSTATE_GENERAL,1000,Any());
+ }
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCol;
try
{