summaryrefslogtreecommitdiff
path: root/libodbcpp
diff options
context:
space:
mode:
Diffstat (limited to 'libodbcpp')
-rw-r--r--libodbcpp/column.cpp2
-rw-r--r--libodbcpp/param.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/libodbcpp/column.cpp b/libodbcpp/column.cpp
index 6f45617..8237535 100644
--- a/libodbcpp/column.cpp
+++ b/libodbcpp/column.cpp
@@ -77,7 +77,7 @@ namespace ODBC {
REBIND(SQL_TIMESTAMP_STRUCT, bindParamT)
template<> void _Column<unsigned char *>::rebind(Command * cmd, unsigned int col) const \
{
- cmd->bindParamS(col, (char *)value);
+ cmd->bindParamS(col, (const char *)value);
}
template <>
diff --git a/libodbcpp/param.cpp b/libodbcpp/param.cpp
index a86bce0..c4d2223 100644
--- a/libodbcpp/param.cpp
+++ b/libodbcpp/param.cpp
@@ -118,7 +118,7 @@ ODBC::Command::bindParamS(unsigned int i, const char * val, size_t len)
{
if (i < params.size()) {
_Param<Glib::ustring>* p = Param::makeParam<Glib::ustring>(params[i]);
- p->value.assign(val, len);
+ p->value.assign(val);
p->bindLen = len;
p->bind(this->hStmt, i + 1, SQL_C_CHAR, SQL_CHAR, 0, 0, p->value.data(), p->value.bytes());
return;