sqldata/sqlsncapi.cpp
// Close the cursor and deallocate buffers
Close the cursor and deallocate buffers
Close the cursor and deallocate buffers
int SqlSncApi::CloseCursor()
{
	int rc = _SQLFreeHandle(SQL_HANDLE_STMT, _hstmt_cursor);
	_hstmt_cursor = SQL_NULL_HANDLE;
	if(_cursor_cols == NULL)
		return 0;
	for(int i = 0; i < _cursor_cols_count; i++)
	{
		delete [] _cursor_cols[i]._data;
		delete [] _cursor_cols[i].ind;
	}
	delete [] _cursor_cols;
	_cursor_cols = NULL;
	_cursor_cols_count = 0;
	_cursor_allocated_rows = 0;
	return rc;
}
int SqlSncApi :: CloseCursor ( ) { int rc = _SQLFreeHandle ( SQL_HANDLE_STMT , _hstmt_cursor ) ; _hstmt_cursor = SQL_NULL_HANDLE ; if ( _cursor_cols == NULL ) return 0 ; for ( int i = 0 ; i < _cursor_cols_count ; i ++ ) { delete [ ] _cursor_cols [ i ] . _data ; delete [ ] _cursor_cols [ i ] . ind ; } delete [ ] _cursor_cols ; _cursor_cols = NULL ; _cursor_cols_count = 0 ; _cursor_allocated_rows = 0 ; return rc ; }
Close the cursor and deallocate buffers
Close the cursor and deallocate buffers
// Close the statement handle // Delete allocated buffers