Share this question

Welcome to Teachnovice Q&A, where you can ask questions and receive answers from other members of the community.

This is a collaboratively edited question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Infragistics ADOMD ClassCastException when connecting to ActivePivot's XMLA server?

0 like 0 dislike
219 views

I am trying to edit the Infragistics WPF PivotGrid Sample so that it will connect to the ActivePivot Sandbox Server. ActivePivot supports XMLA and I can connect to the same Sandbox Server using the 'From Analysis Services' DataSource option in MS Excel with no issues. I edited the odc file to match the exact same connection string as below and it sill worked.

In the DataSourceAdomdNet.xaml file in the Infragistics.Samples.WPF project, I replaced the AdomdDataSource with the following:

        <igOlap:AdomdDataSource x:Key="AdomdDataSource"
                                Database="Sandbox"
                                Cube="EquityDerivativesCube">
            <igOlap:AdomdDataSource.ConnectionSettings>
                <igOlap:AdomdConnectionSettings ConnectionString="Password=admin;Persist Security Info=True;User ID=admin;Initial Catalog=Sandbox;Provider=MSOLAP.4;Persist Security Info=True;Data Source=http://localhost:8080/xmla;MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error" />
            </igOlap:AdomdDataSource.ConnectionSettings>

        </igOlap:AdomdDataSource>

When I run the Samples project and look at the PivotGrid, I see the following exception:

InnerException: System.InvalidCastException
   HResult=-2147467262
   Message=Object cannot be cast from DBNull to other types.
   Source=mscorlib
   StackTrace:
        at System.DBNull.System.IConvertible.ToDateTime(IFormatProvider provider)
        at System.Convert.ToDateTime(Object value, IFormatProvider provider)
        at Microsoft.AnalysisServices.AdomdClient.CubeDef.get_LastProcessed()
        at Infragistics.Olap.Adomd.AdomdDataProvider.LoadCubesWorkerDoWork(Object sender, DoWorkEventArgs e)
        at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
        at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
   InnerException: 

I am experienced with ActivePivot, but not so much with Infragistics/ADOMD.NET. I have never seen this type of error when using any other XMLA/ADOMD client with ActivePivot.

Can anyone help?

Thanks

asked Jan 24, 2015 by doc  

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...