laptop and a wrench

漏洞

An error occurs while using 'sde.next_rowid' to insert a row into a table using Python.

上次发布: June 6, 2017 ArcSDE/Enterprise Geodatabase
漏洞 ID 编号 BUG-000094187
已提交February 13, 2016
上次修改时间June 5, 2024
适用范围ArcSDE/Enterprise Geodatabase
找到的版本10.3
操作系统Windows OS
操作系统版本7.0 64 Bit
状态Non-Reproducible

附加信息

Next_RowID takes a table that is registered with the geodatabase as an input parameter and returns the next value for the ObjectID (RowID) field. You can use this value when you are inserting a row to the table using SQL. When executing through ArcGIS we pass the execution through the ODBC driver, and SQL Server will use sp_describe_first_result_set to return the metadata for the first possible result set of the Transact-SQL batch. Because of this behavior via the Microsoft ODBC client driver, you must include WITH RESULT SETS NONE into the execution of NEXT_ROWID. i.e. import arcpy sql="DECLARE @oid INT; DECLARE @owner nvarchar(128) = 'dbo'; DECLARE @table nvarchar(128) = 'TABTEST'; EXEC dbo.next_rowid @owner , @table, @oid OUTPUT WITH RESULT SETS NONE; INSERT INTO dbo.TABTEST(OBJECTID,NAME,C1) VALUES (@oid,'prvni',1);" con = arcpy.ArcSDESQLExecute(r'Database Connections\enterpriseGDB.sde') con.execute(sql)

重现步骤

漏洞 ID: BUG-000094187

软件:

  • ArcSDE/Enterprise Geodatabase

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项