summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/drivers/odbc/OPreparedStatement.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OTools.cxx1
2 files changed, 3 insertions, 0 deletions
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index cf737a0d6637..54f6a2638f26 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -359,6 +359,8 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_
}
else
{
+ assert(getOwnConnection()->getTextEncoding() != RTL_TEXTENCODING_UCS2 &&
+ getOwnConnection()->getTextEncoding() != RTL_TEXTENCODING_UCS4);
OString sOData(
OUStringToOString(_sData, getOwnConnection()->getTextEncoding()));
nCharLen = nByteLen = sOData.getLength();
diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx
index bbfc1ead1186..fe3b391761aa 100644
--- a/connectivity/source/drivers/odbc/OTools.cxx
+++ b/connectivity/source/drivers/odbc/OTools.cxx
@@ -415,6 +415,7 @@ OUString OTools::getStringValue(OConnection* _pConnection,
case SQL_WLONGVARCHAR:
{
SQLWCHAR waCharArray[2048];
+ BOOST_STATIC_ASSERT(sizeof(waCharArray) % sizeof(SQLWCHAR) == 0);
rtl_TextEncoding nSQLWCHAREncoding = RTL_TEXTENCODING_UCS2;
BOOST_STATIC_ASSERT(sizeof(SQLWCHAR) == 2 || sizeof(SQLWCHAR) == 4);
if(sizeof(SQLWCHAR) == 4)