The ODBC row status array
The row status array returns the status of each row in the rowset.
You allocate the row status array in your application. Then you
specify the address of this array with the SQL_ATTR_ROW_STATUS_PTR
statement attribute. The array must have as many elements as are specified
by the SQL_ATTR_ROW_ARRAY_SIZE statement attribute. SQLExtendedFetch(), SQLFetchScroll(),
or SQLSetPos() set the values of the row status array,
unless those methods are called after the cursor has been positioned
by SQLExtendedFetch(). If the value of the SQL_ATTR_ROW_STATUS_PTR
statement attribute is a null pointer, SQLExtendedFetch(), SQLFetchScroll(),
and SQLSetPos() do not return the row status.
The contents of the row status array buffer are undefined if SQLExtendedFetch() or SQLFetchScroll() does
not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO.
| Row status array value | Description |
|---|---|
| SQL_ROW_SUCCESS | The row was successfully fetched. |
| SQL_ROW_SUCCESS_WITH_INFO | The row was successfully fetched, but a warning was returned about the row. |
| SQL_ROW_ERROR | An error occurred when the row was fetched. |
| SQL_ROW_ADDED | The row was inserted by SQLBulkOperations().
If the row is fetched again, or is refreshed by SQLSetPos(),
its status is SQL_ROW_SUCCESS. This value is not set by Db2 ODBC does not make inserted rows visible to a scrollable cursor result set, so it does not return this value. |
| SQL_ROW_UPDATED | The row was successfully fetched and has changed
since it was last fetched from this result set. If the row is fetched
again from this result set, or is refreshed by SQLSetPos(),
the status changes to the new status for the row.Db2 ODBC makes updated rows visible if they continue
to satisfy the predicate of the query. Therefore, for |
| SQL_ROW_DELETED | The row was deleted after it was last fetched
from this result set. Db2 ODBC does not make deleted rows visible to a scrollable cursor result set, so it does not return this value. |
| SQL_ROW_NOROW | The rowset overlapped the end of the result set, and no row was returned that corresponds to the corresponding element of the row status array. |