chaitanyap

GETTING DATASETS BY PASSING CONCNETION PROPERTIES

Discussion created by chaitanyap on Feb 25, 2013
Latest reply on Mar 7, 2013 by agray1
I am trying to get all dataset names and feature class available in ARC sde..... i WROTE BELOW CODE..... bUT i AM GETTING ERROR LIKE oPERATION FAILED.. CAN ANY ONE SUGGEST ME THE SOLUTION...





IWorkspaceFactory pWF = new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactoryClass();
                IPropertySet pPropertySet = new ESRI.ArcGIS.esriSystem.PropertySetClass();
                pPropertySet.SetProperty("SERVER", "172.16.8.56");
                pPropertySet.SetProperty("INSTANCE", "1522");
                pPropertySet.SetProperty("DATABASE", "@C:\\Documents and Settings\\ABC\\Application Data\\ESRI\\ArcCatalog");
                pPropertySet.SetProperty("USER", "ABC");
                pPropertySet.SetProperty("PASSWORD", "ABC");
                pPropertySet.SetProperty("VERSION", "ABC");
                IWorkspace pWorkSpace = pWF.Open(pPropertySet, 0);                             
                IEnumDataset enumDataset = pWorkSpace.get_Datasets(esriDatasetType.esriDTAny);
                IDataset pDataSet = enumDataset.Next();
                while (pDataSet != null)
                {
                    string DSetName = pDataSet.Name;
                }

Outcomes