AdomdSampleApp GetSchemaDataSet problem

From: Richard Bond (Richard.Bond_at_tnsofres.com)
Date: 06/21/04


Date: Mon, 21 Jun 2004 15:43:54 +0100

Hello,

I've installed the sample application and am having problems with a
particualr line of code:
objTable = connection.GetSchemaDataSet(AdomdSchemaGuid.Catalogs,
Nothing).Tables(0)

{System.InvalidCastException}
    [System.InvalidCastException]: {System.InvalidCastException}
    HelpLink: Nothing
    InnerException: Nothing
    Message: "Specified cast is not valid."
    Source: "System.Data"
    StackTrace: " at System.Data.DataTableCollection.get_Item(Int32 index)
   at
Microsoft.Samples.SqlServer.AdomdSample.AdomdHelper.GetSchemaDataSet_Catalog
s(AdomdConnection& connection) in
C:\Shared\ADOMD_NET\AdomdSampleSolution\AdomdSample\AdomdHelper.vb:line 184
   at
Microsoft.Samples.SqlServer.AdomdSample.MainDialog.LoadDatabaseMetadata(Tree
Node parentNode) in
C:\Shared\ADOMD_NET\AdomdSampleSolution\AdomdSample\MainDialog.vb:line 691"
    TargetSite: {System.Reflection.RuntimeMethodInfo}

I've also tried connection.GetSchemaDataSet(AdomdSchemaGuid.Catalogs,
Nothing) (without trying to reference the first table.

any thoughts?

My Datasource Naae is the name of my Local Analysis services server.

regards,

Richard