I'm in process of migrating the Batch Reconcile/Post utility from the developer samples from VB6 to C# and along the way I'm adding the analyze(business table) functionality. However I'm stuck with how to verify that the feature that I'm looping over to analyze is registered with the database and available to analyze.I had initially believed that it was because some of the tables were owned by different schemas/versions but after I ran a check for that I found that wasn't in fact the case.any advice on this one? I had thought to use the CLSID from an ITable/IClass but I am throwing a COMException currently because I cannot cast from an IDataset to and ITable/IClass.the current state of my code is below. try
{
IVersionedWorkspace3 sdeVersion = (IVersionedWorkspace3)sdeWorkspace;
sdeVersion.Compress();
IEnumDataset datasets = sdeWorkspace.get_Datasets(esriDatasetType.esriDTAny);
IDataset dataset = datasets.Next();
while (dataset != null)
{
String dsName = dataset.Name;
IDatasetAnalyze dbanalysis = (IDatasetAnalyze)dataset;
try
{
dbanalysis.Analyze((int)esriTableComponents.esriBusinessTable);
}
catch (Exception exception)
{
throw new Exception(String.Format("Analyze business table error: {0}", exception.Message), exception);
}
dataset = datasets.Next();
}
MessageBox.Show("compress completed successfully", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
catch
{
MessageBox.Show("compress failed for versioned workspace", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}