将shp导入SDE中出现“表或视图不存在”问题
其原因是权限不够,下边代码可以用来检查权限是否够。
private void ESRILicense() { IAoInitialize mAoInitialize = new AoInitializeClass(); esriLicenseStatus licenseStatus = (esriLicenseStatus)mAoInitialize.IsProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeEngineGeoDB); if (licenseStatus == esriLicenseStatus.esriLicenseAvailable) { if (licenseStatus != esriLicenseStatus.esriLicenseCheckedOut) licenseStatus = (esriLicenseStatus)mAoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeEngineGeoDB); if (licenseStatus != esriLicenseStatus.esriLicenseCheckedOut) { System.Windows.Forms.MessageBox.Show("程序初始化失败!"); throw new Exception("初始化ArcGIS Engine失败"); } } else { System.Windows.Forms.MessageBox.Show("没有程序运行许可!"); throw new Exception("没有ArcGIS Engine许可"); } } |