Data Mining

Download Free Data Mining Source Code In C/C++, C#, Visual Basic, Visual Basic.NET, Java,
and other programming languages
Welcome to Data Mining Sign in | Join | Help
in Search

Data Mining Source Code Newsletter

Announcing The Data Mining Source Code Newsletter!

Subscribe By Email | Subscribe By RSS Feed

Getting exception on executing ExecuteCellSet on AdomdCommand object

Last post 05-29-2005, 17:56 by DRK. 4 replies.
Sort Posts: Previous Next
  •  05-18-2005, 20:50 4751

    Sad [:(] Getting exception on executing ExecuteCellSet on AdomdCommand object

    I'm trying to execute an mdx query in C# and getting exception on calling ExecuteCellSet() on AdomdCommand object,

    AdomdCommand objCommand;

    CellSet objCellSet;

    objCommand.CommandText =i have the query string here which will return the result when executing in mdx sample application explicitly, but will fail from the following command.

    objCellSet = objCommand.ExecuteCellSet();

    I'm getting exception and message says a data table of that kind already in dataset. Any idea?

  •  05-21-2005, 9:57 4762 in reply to 4751

    Re: Getting exception on executing ExecuteCellSet on AdomdCommand object

    Which verion of ADOMD.NET are you using?

    Did you install last patch?
    http://www.microsoft.com/downloads/details.aspx?FamilyID=790d631b-bff9-4f4a-b648-e9209e6ac8ad&displaylang=en



    MihaiBejenariu,
    MCSD.NET, CAPM,
    .NET thoughts and stuff
  •  05-25-2005, 9:21 4808 in reply to 4762

    Re: Getting exception on executing ExecuteCellSet on AdomdCommand object

    Thanks. I'm using ADOMD.net 8.0. I have installed latest patch and hotfix, still it's blowing,

  •  05-25-2005, 14:45 4811 in reply to 4808

    Re: Getting exception on executing ExecuteCellSet on AdomdCommand object

    I've read about some problems on beta version, but it seems it is not the case.
    Could you please provide us more details about the error. Could you please post code snippet which generates the error, the exception message and stack trace?




    MihaiBejenariu,
    MCSD.NET, CAPM,
    .NET thoughts and stuff
  •  05-29-2005, 17:56 4854 in reply to 4811

    Re: Getting exception on executing ExecuteCellSet on AdomdCommand object

    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

Announcing The Data Mining Source Code Newsletter!

Subscribe By Email | Subscribe By RSS Feed