reprinted from: Http://blog.sina.com.cn/s/blog_6faf711d0100za4x.htmlget the name of the MDB database feature classThe overall idea is as follows:
1. Get all DataSet objects in the workspace (Ienumdataset) through the Datasets property of Iworkspace
2. Enumerate Enumdataset, get the DataSet object
3. If the dataset is Featuredataset
4.QI to Ifeatureclasscontainer interface
for (int i=0;i < pfclcontainer.classcount;i++)
{
Ifeatureclass pfeatureclass= Pfclcontainer.class (i);
Idataset Pdataset = Pfeatureclass as Idataset;
String Pfeaclsname= pdataset.name;
......
}--------------------------------------------other-----------------------------reprinted from: http://blog.csdn.net/ u011609113/article/details/52083451
Some feature datasets are placed in a particular feature dataset, while others are directly in the workspace. Such as.
Getting a feature class that is independent of the feature DataSet is simple, as follows:
1 /// <summary> 2 ///Get a standalone feature class3 /// </summary> 4 /// <param name= "In_somefeaturedataset" >any one feature dataset under the workspace</param> 5 /// <param name= "In_featureclassname" >name of the standalone feature class</param> 6 /// <returns>The independent feature class you are looking for</returns> 7 PrivateIfeatureclass Prv_getindependentfeatureclass (Ifeaturedataset in_somefeaturedataset,stringin_featureclassname)8 { 9 //get all the standalone feature classesTenIenumdataset temp_allindependentfeatureclass=(IN_SomeFeatureDataset.Workspace.get_Datasets (Esridatasettype.esridtfeatureclass)); One //get each individual feature class AIfeatureclass Each_independentfeatureclass = Temp_allindependentfeatureclass.next () asIfeatureclass; - //traverse all feature classes - while(Each_independentfeatureclass! =NULL) the { - //If you find it, go back. - if(each_independentfeatureclass.aliasname==in_featureclassname) - returnEach_independentfeatureclass; + } - return NULL; +}
Get MDB under Feature class Featureclass, standalone feature class, no DataSet Get feature class