Addressed review comments
This commit is contained in:
parent
b025110194
commit
ad1d990cda
|
@ -823,6 +823,7 @@ bool core_sqlsrv_fetch( _Inout_ sqlsrv_stmt* stmt, _In_ SQLSMALLINT fetch_orient
|
|||
CHECK_CUSTOM_ERROR( stmt->past_fetch_end, stmt, SQLSRV_ERROR_FETCH_PAST_END ) {
|
||||
throw core::CoreException();
|
||||
}
|
||||
|
||||
// First time only
|
||||
if ( !stmt->fetch_called ) {
|
||||
SQLSMALLINT has_fields;
|
||||
|
@ -830,6 +831,7 @@ bool core_sqlsrv_fetch( _Inout_ sqlsrv_stmt* stmt, _In_ SQLSMALLINT fetch_orient
|
|||
has_fields = stmt->column_count;
|
||||
} else {
|
||||
has_fields = core::SQLNumResultCols( stmt TSRMLS_CC );
|
||||
stmt->column_count = has_fields;
|
||||
}
|
||||
|
||||
CHECK_CUSTOM_ERROR( has_fields == 0, stmt, SQLSRV_ERROR_NO_FIELDS ) {
|
||||
|
|
|
@ -1793,6 +1793,7 @@ SQLSMALLINT get_resultset_meta_data(_Inout_ sqlsrv_stmt * stmt)
|
|||
getMetaData = true;
|
||||
if (stmt->column_count == ACTIVE_NUM_COLS_INVALID) {
|
||||
num_cols = core::SQLNumResultCols(stmt TSRMLS_CC);
|
||||
stmt->column_count = num_cols;
|
||||
} else {
|
||||
num_cols = stmt->column_count;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue