默认头像
路人甲
路人甲
  • 注册日期2004-08-11
  • 发帖数31
  • QQ
  • 铜币225枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:2071回复:3

关于CreateFeatureDataset的问题

楼主#
更多 发布于:2008-03-31 16:58

今天在编写CreateFeatureDataset功能时,出现问题:

Dim iFeatureDataSet As ESRI.ArcGIS.Geodatabase.IFeatureDataset

       On Error GoTo CheckErr

       iFeatureDataSet = SDE_FeatureWS.CreateFeatureDataset(iDatasetName, iSpatialReference)
            Exit Sub

CheckErr:
       MessageBox.Show(Err.Number ; ":" ; Err.Description, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error)
       Exit Sub

出现错误 "-2147220960 "好像说是没有权限操作

但我们买了AE的gdb读写功能的授权,在授权列表中有"gdbedit"这个权限

也初始化了

       

Dim iAoInitialize As New ESRI.ArcGIS.esriSystem.AoInitialize()

       iAoInitialize.Initialize(ESRI.ArcGIS.esriSystem.esriLicenseProductCode.esriLicenseProductCodeEngineGeoDB)

不知道对不对,请大家帮忙看看
喜欢0 评分0
默认头像
管理员
管理员
  • 注册日期2003-07-25
  • 发帖数5917
  • QQ14265545
  • 铜币29669枚
  • 威望217点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • GIS帝国铁杆
1楼#
发布于:2008-03-31 23:50

Here is the description from
http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/fdoError.htm
for error code -2147220960:
The application is not licensed to create or modify schema for this type of data.

So what's going on here is that you probably don't have the Network Analyst license checked out in your standalone program. Note that your code worked in VBA because the parent application (most likely, ArcCatalog) was taking care of the licensing for you. Michael's post above shows you how to check out the Network Analyst license for your standalone application by calling IAoInitialized::CheckOutExtension() on the AoInitialize object.

[此贴子已经被作者于2008-3-31 23:51:58编辑过]
没钱又丑,农村户口。头可断,发型一定不能乱。 邮箱:gisempire@qq.com
举报 回复(0) 喜欢(0)     评分
默认头像
路人甲
路人甲
  • 注册日期2004-08-11
  • 发帖数31
  • QQ
  • 铜币225枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2008-04-01 11:01
照到错误了,只要注册engineGDB就可以了,主要问题在licenseControl,licenseControl里面注册的license全部去掉,完全用代码来注册
举报 回复(0) 喜欢(0)     评分
默认头像
路人甲
路人甲
  • 注册日期2006-12-11
  • 发帖数5
  • QQ
  • 铜币115枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2008-04-06 14:19

是License的问题吧

举报 回复(0) 喜欢(0)     评分
默认头像

返回顶部