sqldata/sqlifmxapi.cpp
// Fetch next portion of data to allocate buffers
Fetch next portion of data to allocate buffers
Fetch next portion of data to allocate buffers
int SqlIfmxApi::Fetch(int *rows_fetched, size_t *time_spent) 
{
	if(_cursor_allocated_rows <= 0)
		return -1;
	size_t start = GetTickCount();
	int rc = _SQLFetch(_hstmt_cursor);
	if(rc != 0 && rc != 100)
		SetError(SQL_HANDLE_STMT, _hstmt_cursor);
	if((rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) && _cursor_lob_exists == true)
	{
		for(size_t i = 0; i < _cursor_cols_count; i++)
		{
			if(_cursor_cols[i]._lob == false)
				continue;
			rc = GetLobPart(0, i, NULL, 0, NULL);
			if(rc == -1)
				break;
		}
	}
	if(rows_fetched != NULL)
		*rows_fetched = _cursor_fetched;
	if(time_spent != NULL)
		*time_spent = GetTickCount() - start;
	return rc;
}
int SqlIfmxApi :: Fetch ( int * rows_fetched , size_t * time_spent ) { if ( _cursor_allocated_rows <= 0 ) return -1 ; size_t start = GetTickCount ( ) ; int rc = _SQLFetch ( _hstmt_cursor ) ; if ( rc != 0 && rc != 100 ) SetError ( SQL_HANDLE_STMT , _hstmt_cursor ) ; if ( ( rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO ) && _cursor_lob_exists == true ) { for ( size_t i = 0 ; i < _cursor_cols_count ; i ++ ) { if ( _cursor_cols [ i ] . _lob == false ) continue ; rc = GetLobPart ( 0 , i , NULL , 0 , NULL ) ; if ( rc == -1 ) break ; } } if ( rows_fetched != NULL ) * rows_fetched = _cursor_fetched ; if ( time_spent != NULL ) * time_spent = GetTickCount ( ) - start ; return rc ; }
Fetch next portion of data to allocate buffers
Fetch next portion of data to allocate buffers
// Fetch the data // SQL_SUCCESS_WITH_INFO is set when data truncated, and error message "Data truncated" // Read not bound LOB data (first chunk) // Get the first LOB chunk // SQLGetData crashes on next call for this table if SQLGetData for the previous row failed