public void Execute() { if (_obj != null) { _obj.Parameters.Clear(); foreach (AdomdParameter param in _parameters) { _obj.Parameters.Add(new Microsoft.AnalysisServices.AdomdClient.AdomdParameter(param.Name, param.Value)); } _obj.Execute(); } else { ExcelAdoMdConnections.VoidDelegate f = delegate { _objExcel.Parameters.Clear(); foreach (AdomdParameter param in _parameters) { _objExcel.Parameters.Add(new ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.AdomdParameter(param.Name, param.Value)); } _objExcel.Execute(); }; f(); } }
public void Close() { if (_type == AdomdType.AnalysisServices) { _conn.Close(); } else { ExcelAdoMdConnections.VoidDelegate f = delegate { _connExcel.Close(); }; f(); } }
public void Open(string connectionString) { if (_type == AdomdType.AnalysisServices) { _conn.Open(connectionString); } else { ExcelAdoMdConnections.VoidDelegate f = delegate { _connExcel.Open(connectionString); }; f(); } }
public void Dispose() { if (_type == AdomdType.AnalysisServices) { _obj.Dispose(); } else { ExcelAdoMdConnections.VoidDelegate f = delegate { _objExcel.Dispose(); }; f(); } }
public void Fill(DataTable tbl) { if (_obj != null) { _obj.Fill(tbl); } else { ExcelAdoMdConnections.VoidDelegate f = delegate { _objExcel.Fill(tbl); }; f(); } }
public void Cancel() { if (_obj != null) { _obj.Cancel(); } else { ExcelAdoMdConnections.VoidDelegate f = delegate { _objExcel.Cancel(); }; f(); } }
public AdomdConnection(string connectionString, AdomdType type) { _type = type; if (_type == AdomdType.AnalysisServices) { _conn = new Microsoft.AnalysisServices.AdomdClient.AdomdConnection(connectionString); } else { ExcelAdoMdConnections.VoidDelegate f = delegate { _connExcel = new ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.AdomdConnection(connectionString); }; f(); } }
public AdomdDataAdapter(AdomdCommand obj) { if (obj.Connection.Type == AdomdType.AnalysisServices) { _obj = new Microsoft.AnalysisServices.AdomdClient.AdomdDataAdapter(); _obj.SelectCommand = (Microsoft.AnalysisServices.AdomdClient.AdomdCommand)obj.UnderlyingCommand; } else { ExcelAdoMdConnections.VoidDelegate f = delegate { _objExcel = new ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.AdomdDataAdapter(); _objExcel.SelectCommand = (ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.AdomdCommand)obj.UnderlyingCommand; }; f(); } }
public void RefreshMetadata() { if (_type == AdomdType.AnalysisServices) { if (_conn != null) { _conn.RefreshMetadata(); } } else { ExcelAdoMdConnections.VoidDelegate f = delegate { if (_connExcel != null) { _connExcel.RefreshMetadata(); } }; f(); } }
public void Dispose() { if (_type == AdomdType.AnalysisServices) { if (_conn != null) { _conn.Dispose(); _conn = null; } } else { ExcelAdoMdConnections.VoidDelegate f = delegate { if (_connExcel != null) { _connExcel.Dispose(); _connExcel = null; } }; f(); } }
public void ChangeDatabase(string database) { if (database == null) { return; } if (database.Trim().Length == 0) { return; } if (_type == AdomdType.AnalysisServices) { _conn.ChangeDatabase(database); } else { ExcelAdoMdConnections.VoidDelegate f = delegate { _connExcel.ChangeDatabase(database); }; f(); } }