laptop and a wrench

漏洞

A searchcursor will cause PythonWin and Idle to crash when used with Add Field in a File Geodatabase.

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM006126
已提交January 17, 2007
上次修改时间April 2, 2025
适用范围No Product Found
找到的版本9.2
状态Will Not Be Addressed

附加信息

We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.

解决办法

This sample stores all the OID's in a python list while in the cursor, and then accesses the list and adds the fields after the cursor has been put to bed.#~~~~~~~~rows = gp.searchcursor(fc)row = rows.next()OIDList = []while row: OIDList.append(row.OBJECTID) row = rows.next()del rowdel rows for OID in OIDList: gp.AddField_management(fc, "TK" + str(OID), "TEXT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "") #~~~~~~~~

重现步骤

漏洞 ID: NIM006126

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项