Changeset: 679268df0057 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/679268df0057 Modified Files: clients/odbc/ChangeLog.Sep2022 clients/odbc/driver/SQLSetPos.c Branch: Sep2022 Log Message:
Improved SQLSetPos(). It now allows RowNumber to be 0 when Operation is SQL_POSITION. diffs (32 lines): diff --git a/clients/odbc/ChangeLog.Sep2022 b/clients/odbc/ChangeLog.Sep2022 --- a/clients/odbc/ChangeLog.Sep2022 +++ b/clients/odbc/ChangeLog.Sep2022 @@ -1,6 +1,10 @@ # ChangeLog file for odbc # This file is updated with Maddlog +* Thu Sep 1 2022 Martin van Dinther <[email protected]> +- Improved SQLSetPos(). It now allows RowNumber to be 0 when Operation + is SQL_POSITION. + * Thu Jul 28 2022 Martin van Dinther <[email protected]> - Improved ODBC Error/Warning messages. They now include the name of the Data Source as required by the ODBC specification: diff --git a/clients/odbc/driver/SQLSetPos.c b/clients/odbc/driver/SQLSetPos.c --- a/clients/odbc/driver/SQLSetPos.c +++ b/clients/odbc/driver/SQLSetPos.c @@ -124,9 +124,11 @@ SQLSetPos(SQLHSTMT StatementHandle, switch (Operation) { case SQL_POSITION: if (RowNumber == 0) { - /* Invalid cursor position */ - addStmtError(stmt, "HY109", NULL, 0); - return SQL_ERROR; + /* If RowNumber is 0, the operation applies to every + * row in the rowset. + * In this case set it to the first row, so 1. + */ + RowNumber = 1; } if (mapi_seek_row(stmt->hdl, stmt->startRow + RowNumber - 1, MAPI_SEEK_SET) != MOK) { _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
