Skip to content

Commit

Permalink
Issue#73: SQL_ATTR_MAX_ROWS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
irodushka committed Sep 4, 2024
1 parent abce1eb commit f6dbdef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OdbcStatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,9 @@ SQLRETURN OdbcStatement::fetchData()

bindOffsetPtrTmp += rowBindType;
++nRow;

if (maxRows && nRow == maxRows)
break;
}
if ( statusPtr && nRow )
memset(statusPtr, SQL_ROW_SUCCESS, sizeof(*statusPtr) * nRow);
Expand Down Expand Up @@ -1095,6 +1098,9 @@ SQLRETURN OdbcStatement::sqlFetchScrollCursorStatic(int orientation, int offset)

bindOffsetPtrTmp += rowBindType;
++nRow;

if (maxRows && nRow == maxRows)
break;
}
if ( statusPtr )
memset(statusPtr, SQL_ROW_SUCCESS, sizeof(*statusPtr) * nRow);
Expand Down

0 comments on commit f6dbdef

Please sign in to comment.