summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools/dbtools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/commontools/dbtools.cxx')
-rw-r--r--connectivity/source/commontools/dbtools.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 08725d9fc9..abc853793b 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: dbtools.cxx,v $
- * $Revision: 1.74 $
+ * $Revision: 1.74.46.1 $
*
* This file is part of OpenOffice.org.
*
@@ -87,6 +87,9 @@
#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
+#include "resource/common_res.hrc"
+#include "resource/sharedresources.hxx"
+
#include <algorithm>
using namespace ::comphelper;
@@ -1893,9 +1896,12 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams,
break;
default:
{
- ::rtl::OUString aVal = ::rtl::OUString::createFromAscii("Unknown SQL Type for PreparedStatement.setObjectWithInfo (SQL Type=");
- aVal += ::rtl::OUString::valueOf(sqlType);
- throw SQLException( aVal,_xParams,::rtl::OUString(),0,Any());
+ ::connectivity::SharedResources aResources;
+ const ::rtl::OUString sError( aResources.getResourceStringWithSubstitution(
+ STR_UNKNOWN_PARA_TYPE,
+ "$position$", ::rtl::OUString::valueOf(parameterIndex)
+ ) );
+ ::dbtools::throwGenericSQLException(sError,NULL);
}
}
}