summaryrefslogtreecommitdiff
path: root/libodbcpp/param.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libodbcpp/param.cpp')
-rw-r--r--libodbcpp/param.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libodbcpp/param.cpp b/libodbcpp/param.cpp
index 3761516..9ccb7c9 100644
--- a/libodbcpp/param.cpp
+++ b/libodbcpp/param.cpp
@@ -47,7 +47,7 @@ ODBC::Param::bind() const
if (!paramBound) {
RETCODE rc = SQLBindParameter(paramCmd->hStmt, paramIdx + 1, SQL_PARAM_INPUT, ctype(), stype(),
size(), dp(), const_cast<void *>(dataAddress()), size(), &bindLen);
- if (rc != SQL_SUCCESS) {
+ if (!SQL_SUCCEEDED(rc)) {
throw Error(rc, SQL_HANDLE_STMT, paramCmd->hStmt, "%s: Bind for parameter %u",
__FUNCTION__, paramIdx);
}