数据库
首页 > 数据库> > ArcEngine中featurecursor分别在sde数据库和gdb数据库下的遍历问题

ArcEngine中featurecursor分别在sde数据库和gdb数据库下的遍历问题

作者:互联网

问题描述

 //一般的循环遍历步骤
 IFeatureCursor featureCursor = featureClass.Search(null,false);
 IFeature feature = null;
 while((feature = featureCursor.NextFeature())!=null)
 {
 }

以上是常用的循环遍历的步骤,最后遍历到feature为null后退出while循环,这时如果再执行一次featureCursor.NextFeature()语句:
1.在gdb和mdb数据库下会得到null;
2.在sde数据库下会得到“调用的函数顺序有误 [Function called out of sequence]”的报错。

标签:遍历,数据库,feature,sde,gdb,featureCursor,null
来源: https://www.cnblogs.com/lLazy/p/10662194.html