|
阅读:1828回复:1
IFeatureLayer和IFeatureClass的Search方法的区别
<P>查看IfeatureLayer的Search方法的帮助,如下:</P>
<P>If there is a definition query set on the layer, the <STRONG>Search </STRONG>method will work on the subset of features in the layer that meet the definition criteria. Otherwise, it will search the <B>FeatureClass</B> associated with the layer.</P> <P>This <STRONG>Search</STRONG> method will not work on joined fields. If the <STRONG>FeaureLayer</STRONG> has any joins, you should use the <STRONG>IGeoFeatureLayer::SeachDisplayFeatures </STRONG>method instead.</P> <DIV>值得注意的是,如果图层没有设置definition query ,那么两者的结果没有差别,但是如果图层设置了definition query ,那么就有差别了,呵呵。</DIV> <DIV > </DIV> <DIV >也就是说,在开发过程中,如果是针对图层数据的操作,那么用IfeatureLayer的Search比较合理,如果是针对图层对应的数据源的操作,那么使用IfeatureClass的search才能保证所有的数据被遍历。</DIV> |
|
|
|
1楼#
发布于:2009-08-15 14:05
....哦~不太明白
|
|