diff --git a/Data/MySQL/src/StatementExecutor.cpp b/Data/MySQL/src/StatementExecutor.cpp index b7e8dbcd8..26a3b333a 100644 --- a/Data/MySQL/src/StatementExecutor.cpp +++ b/Data/MySQL/src/StatementExecutor.cpp @@ -80,8 +80,8 @@ void StatementExecutor::bindParams(MYSQL_BIND* params, std::size_t count) if (count == 0) return; - if (mysql_stmt_bind_param(_pHandle, params) != 0) - throw StatementException("mysql_stmt_bind_param() error ", _pHandle, _query); + if (mysql_stmt_bind_named_param(_pHandle, params, count, nullptr) != 0) + throw StatementException("mysql_stmt_bind_named_param() error ", _pHandle, _query); } diff --git a/Data/MySQL/testsuite/src/SQLExecutor.cpp b/Data/MySQL/testsuite/src/SQLExecutor.cpp index 6e822cf50..084dedec8 100644 --- a/Data/MySQL/testsuite/src/SQLExecutor.cpp +++ b/Data/MySQL/testsuite/src/SQLExecutor.cpp @@ -205,7 +205,7 @@ void SQLExecutor::bareboneMySQLTest(const char* host, const char* user, const ch bind_param[4].buffer = &fifth; bind_param[4].buffer_type = MYSQL_TYPE_FLOAT; - rc = mysql_stmt_bind_param(hstmt, bind_param); + rc = mysql_stmt_bind_named_param(hstmt, bind_param, 5, nullptr); assertTrue (rc == 0); rc = mysql_stmt_execute(hstmt);