Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
ClassCastException when attempting to connect to ActivePivot XMLA Server with ADOMD.NET
posted

Hi,

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.

Can anyone help?

Thanks

p.s. i originally asked this question on stackoverflow: http://stackoverflow.com/questions/27846489/infragistics-adomd-classcastexception-when-connecting-to-activepivots-xmla-serv