Thanks Sean for your help.I tried your suggestion but nothing is happening. I get the zero as the count in ISet as a return type of the IChangeDatabaseVersion::Execute. I am trying to figure out what is happening but no luck so far. Below is my code.
private void ChangeVersionNew(ESRI.ArcGIS.ArcMapUI.IMxDocument pMxDoc, IVersion pOldVersion, IVersion pNewVersion)
{
try
{
IMapAdmin2 pMapAdmin2;
pNewVersion.RefreshVersion();
pMapAdmin2 = pMxDoc.FocusMap as IMapAdmin2;
IChangeDatabaseVersion pChangeDatabaseVersion = new ChangeDatabaseVersionClass();
ISet pSet = pChangeDatabaseVersion.Execute(pOldVersion, pNewVersion, pMxDoc.FocusMap as IBasicMap);
pMapAdmin2.FireChangeVersion(pOldVersion, pNewVersion);
IActiveView pActiveView = pMxDoc.FocusMap as IActiveView;
pActiveView.Refresh();
pMxDoc.UpdateContents();
pNewVersion.RefreshVersion();
return;
}
catch (Exception ex)
{
}
}
Can you please have a look at it and let me know what is wrong with this code please?Appreciate your help.Thanks,Sanjay.