zoukankan      html  css  js  c++  java
  • 提高ITable数据更新效率

    一般更新ITable的数据,最常用的更新方法是这样更新(一条一条更新,不是批量更新)。

                ITable tTable = (ITable)_CurFeatureClass;

                ICursor tCursor = tTable.Search(null, true);

                IRow tRow = tCursor.NextRow();

                while (tRow != null)

                {

                    tRow.set_Value(1, "aa");

                    tRow.Store();

                    tRow = tCursor.NextRow();

                }

    这种方法更新数据的效率很低.所以最好用下面的方法去更新,效率会高很多.

                ITable tTable = (ITable)_CurFeatureClass;

                ICursor tCursor = tTable.Update(null, true);

                IRow tRow = tCursor.NextRow();

                while (tRow != null)

                {

                    tRow.set_Value(1, "aa");

                    tCursor.UpdateRow(tRow);

                    tRow = tCursor.NextRow();

                }

     

    作者: cglnet
    本文版权归cglNet和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.
  • 相关阅读:
    eclipse中svn的各种状态图标详解
    Invalid configuation file. File "**********" was created by a VMware product with more feature than this version of VMware Workstation and cannot be
    linux下tomcat无法访问问题(换一种说法:无法访问8080端口)
    安装MySQL start Service(无法启动服务)
    eclipse下SVN subclipse插件
    tomcat启动窗口中的时间与系统时间不一致
    关于如果从SQLSERVER中获取 数据库信息 或者 表信息
    有关google的appengine部署服务器的简单教程
    部署到Google App Engine时中途退出后引起的问题
    重温WCF之数据契约中使用枚举(转载)(十一)
  • 原文地址:https://www.cnblogs.com/cglNet/p/2707298.html
Copyright © 2011-2022 走看看