/// <summary> /// Activates the data area on the specified cube on the Olap server. This method can be called only /// once and deactivate must be called when done. If activate is called two times without calling deactivate /// in between an exception is thrown. /// </summary> public void Activate() { if (!NativeOlapApi.DataAreaDefine(_cube.Server.Store.ClientSlot, _cube.Server.ServerHandle, _cube.Name, _elements, _parameters, _cube.Server.DataAreaActive, _cube.Server.LastErrorInternal)) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("The data area could not be activated!"); sb.Append(", Error: "); sb.Append(System.Convert.ToString(_cube.Server.LastErrorInternal.Value)); sb.Append(", "); sb.Append(ToString()); throw new OlapException(sb.ToString(), _cube.Server.LastErrorInternal.Value); } _data = NativeOlapApi.DataAreaFirst(_cube.Server.Store.ClientSlot, _cube.Server.ServerHandle, _cube.Name, _parameters, _cube.Server.LastErrorInternal); _currentDataSet = -1; _isActivated = true; }
private void MdsSetValueProlog() { if (_isActivated) { Deactivate(); _isActivated = true; } if (!NativeOlapApi.DataAreaDefine(_cube.Server.Store.ClientSlot, _cube.Server.ServerHandle, _cube.Name, _elements, _parameters, _cube.Server.DataAreaActive, _cube.Server.LastErrorInternal)) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("The data area could not be defined!"); sb.Append(", Error: "); sb.Append(System.Convert.ToString(_cube.Server.LastErrorInternal.Value)); sb.Append(", "); sb.Append(ToString()); throw new OlapException(sb.ToString(), _cube.Server.LastErrorInternal.Value); } }