diff --git a/odbcapi.c b/odbcapi.c index 2b4e5c63e3633bab46046d8a09290788f28a6ed3..2db6a9d38274bb97bd0d8ac7ef9bf8a8e2de430b 100644 --- a/odbcapi.c +++ b/odbcapi.c @@ -631,6 +631,12 @@ SQLRowCount(HSTMT StatementHandle, if (SC_connection_lost_check(stmt, __FUNCTION__)) return SQL_ERROR; + if (!RowCount) { + SC_clear_error(stmt); + SC_set_error(stmt, STMT_INVALID_NULL_ARG, "The paramter RowCount pointer is required", __FUNCTION__); + return SQL_ERROR; + } + ENTER_STMT_CS(stmt); SC_clear_error(stmt); StartRollbackState(stmt);