Objects in this class cannot be updated outside an edit session问题解决方案(ArcEngine编辑)

Objects in this class cannot be updated outside an edit session解决办法

http://bbs.esrichina-bj.cn/esri/archiver/tid-80676.html

 

用ArcGIS Engine对存储于ArcSDE中的数据时行编辑时会出现错误,错误提示为:Objects in this class cannot be updated outside an edit session,出现该错误时可以从以下几个方面去找一下问题:
   1.检查ArcGIS Engine的License文件的授权是否设置了ArcGIS Engine Enterprise GEo...
   2.检查是否注册了版本
   3.检查是否在数据库有与该图层有关系的图层,如拓扑关系,相连的注记层等。这些图层会占用编辑图层,出现错误

   4.检查要素的空间索引是否缺失。
   以上仅供参考,希望会对大家有所帮助!

 

samxmsy 发表于 2010-11-10 14:39

 

谢谢lz 这个问题我遇到过,结果是因为“在数据库有与该图层有关系的图层,如拓扑关系,相连的注记层等。这些图层会占用编辑图层,出现错误”  但是我想知道为什么因为拓扑关系或者注记层的原因会出现这个原因。lz能给解释下吗?

 

GIS梦想 发表于 2010-11-12 15:59

这个我也不是很清楚,我的理解是这样的,ArcSDE是一个中间件,它是架在了SQL server,Oracle等DBMS数据库上,专门为空间查询提供的一种解决方案。它的底层处理的还是各种数据表,如果有拓扑关系或者注记层相链接的时候,可能会有一些机制对此加上了独占锁(写锁)但得只能对其读取,而不能进行编辑。个人的理解,不一定正确,谢谢!

Objects in this class cannot be updated outside

http://blogold.chinaunix.net/u/15722/showart_1777805.html

 

问题

    外地出差的同事小周反映图形系统编辑时报"Objects in this class cannot be updated outside an edit session"错误,这个问题我网上搜了下被我找出原因来了,呵呵!属于程序的问题。

    当一个要素类参与了一个拓扑(或Geometry  Network)之后,对该要素类执行创建要素、修改要素图形或属性时,可能会出现这个异常:'Objects in this class cannot be updated outside an edit session'

原因
    这是由于ArcEngine应用程序中使用的 License权限不足引起的。在ArcEngine 应用程序里面通过ArcSDE进行编辑需要License'ArcGIS Engine Enterprise Geodatabase',或ArcEditor或ArcInfo。

 解决办法
    在ArcEngine应用程序的LicenseInitializer.InitializeApplication中,为程序增加Geodatabase的编辑权限。


    
Public Function InitializeApplication As Boolean

       '……
       licenseStatus = CheckOutLicensesesriLicenseProductCode.esriLicenseProductCodeEngineGeoDB

        licenseStatus = CheckOutLicensesesriLicenseProductCode.esriLicenseProductCodeEngine
       
       '……
    End Function
posted @ 2011-07-19 14:45  @龙飞凤舞@  阅读(3172)  评论(0编辑  收藏  举报