核心代码
1 IWorkspaceFactory pFactory = new AccessWorkspaceFactoryClass();//这里需要在program.cs中添加desktop绑定 2 IWorkspace pWorkspace = pFactory.OpenFromFile(temMDBpath, 0);//这里要求具备axLiscense,可以添加控件添加或代码添加 3 IFeatureWorkspace pFeatureWorkspace = pWorkspace as IFeatureWorkspace; 4 string temDSName="tem"; 5 ISpatialReference pSR = new UnknownCoordinateSystemClass(); 6 pSR.SetDomain(-60000000, 60000000, -60000000, 60000000); 7 IFeatureDataset pFeaDataset = pFeatureWorkspace.CreateFeatureDataset(temDSName, pSR);
可以参考的网址:传送门