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 ) {
|
CHECK_CUSTOM_ERROR( stmt->past_fetch_end, stmt, SQLSRV_ERROR_FETCH_PAST_END ) {
|
||||||
throw core::CoreException();
|
throw core::CoreException();
|
||||||
}
|
}
|
||||||
|
|
||||||
// First time only
|
// First time only
|
||||||
if ( !stmt->fetch_called ) {
|
if ( !stmt->fetch_called ) {
|
||||||
SQLSMALLINT has_fields;
|
SQLSMALLINT has_fields;
|
||||||
|
@ -830,6 +831,7 @@ bool core_sqlsrv_fetch( _Inout_ sqlsrv_stmt* stmt, _In_ SQLSMALLINT fetch_orient
|
||||||
has_fields = stmt->column_count;
|
has_fields = stmt->column_count;
|
||||||
} else {
|
} else {
|
||||||
has_fields = core::SQLNumResultCols( stmt TSRMLS_CC );
|
has_fields = core::SQLNumResultCols( stmt TSRMLS_CC );
|
||||||
|
stmt->column_count = has_fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECK_CUSTOM_ERROR( has_fields == 0, stmt, SQLSRV_ERROR_NO_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;
|
getMetaData = true;
|
||||||
if (stmt->column_count == ACTIVE_NUM_COLS_INVALID) {
|
if (stmt->column_count == ACTIVE_NUM_COLS_INVALID) {
|
||||||
num_cols = core::SQLNumResultCols(stmt TSRMLS_CC);
|
num_cols = core::SQLNumResultCols(stmt TSRMLS_CC);
|
||||||
|
stmt->column_count = num_cols;
|
||||||
} else {
|
} else {
|
||||||
num_cols = stmt->column_count;
|
num_cols = stmt->column_count;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue