I have code that gets all the Feature Datasets in a database in order to loop through them and find the one I want. This code returns 2 datasets of 24 in an SDE 9.2 database, but 3 datasets of 24 in a version 10 SP 2 database. The user has at least select permissions on all 24 of them, but the code only returns certain ones (and different ones). The code is very simple, shown below. What the heck is going on?
ESRI.ArcGIS.Geodatabase.IWorkspace _ws = (ESRI.ArcGIS.Geodatabase.IWorkspace)aWorkspaceEdit;
ESRI.ArcGIS.Geodatabase.IEnumDataset _ed = _ws.get_Datasets(ESRI.ArcGIS.Geodatabase.esriDatasetType.esriDTFeatureDataset);
ESRI.ArcGIS.Geodatabase.IDataset _ds = null;
while ((_ds = _ed.Next()) != null) {
if (_ds.BrowseName == _datasetName) {
ESRI.ArcGIS.Geodatabase.IEnumDataset _dsed = _ds.Subsets;
ESRI.ArcGIS.Geodatabase.IDataset _dsfc = null;
while ((_dsfc = _dsed.Next()) != null) {
if (_dsfc.BrowseName == aFeatureClassName) {
_fc = (ESRI.ArcGIS.Geodatabase.IFeatureClass)_dsfc;
break;
}
}
}
if (_fc == null) {
_ds = _ed.Next();
} else {
break;
}
}
_ed.Reset();
