This is the code snippet
// initialize a new adomdcommand object for the specified connection
objCommand = connection.CreateCommand();
// supply the command text for the adomdcommand object
objCommand.CommandText = queryString;
// attempt to run the command on the cell cellset
try
{
objCellSet = objCommand.ExecuteCellSet();
// return the retrieved cellset
return objCellSet;
}
catch (Exception ex)
{
Console.Write("Exception: " + ex);
objCellSet = null;
return objCellSet;
}
Exception: System.Data.DuplicateNameException: A DataTable named 'UOM' already b
elongs to this DataSet.
at System.Data.DataTableCollection.RegisterName(String name)
at System.Data.DataTableCollection.BaseAdd(DataTable table)
at System.Data.DataTableCollection.Add(DataTable table)
at Microsoft.AnalysisServices.AdomdClient.MDDatasetFormatter.ReadAxesInfo(Xml
Reader reader)
at Microsoft.AnalysisServices.AdomdClient.MDDatasetFormatter.ReadMDDataset(Xm
lReader reader)
at Microsoft.AnalysisServices.AdomdClient.SoapFormatter.ReadDataSetResponsePr
ivate(XmlReader reader)
at Microsoft.AnalysisServices.AdomdClient.SoapFormatter.ReadExecuteResponsePr
ivate(XmlReader reader, Boolean throwOnInlineErrors)
at Microsoft.AnalysisServices.AdomdClient.SoapFormatter.ReadResponse(XmlReade
r reader, Boolean throwOnInlineErrors)
at Microsoft.AnalysisServices.AdomdClient.XmlaClientProvider.Microsoft.Analys
isServices.AdomdClient.IExecuteProvider.ExecuteMultidimensional(ICommandContentP
rovider contentProvider, AdomdPropertyCollection commandProperties, IDataParamet
erCollection parameters)
at Microsoft.AnalysisServices.AdomdClient.AdomdCommand.ExecuteCellSet()
at ceat.excel_writer.ceat_writer.ceat_writer_runQuery(AdomdConnection& connec
tion, String queryString) in c:\test2\ceat_writer\class_ceat_excel_writer.cs:lin
e 140error while attempting to execute the mdx query copy-step 1. Please investi
gate input file
When I run the query in MDX sample application editor, it is returning values.
Thanks for your help