| Numéro d’ID de bogue |
BUG-000094187 |
| Envoi | February 13, 2016 |
| Dernière modification | June 5, 2024 |
| S’applique à | ArcSDE/Enterprise Geodatabase |
| Version trouvée | 10.3 |
| Système d’exploitation | Windows OS |
| Version du système d’exploitation | 7.0 64 Bit |
| Statut | Non-Reproducible
Ce problème n’a pas pu être reproduit au cours des tests réalisés par l’équipe de développement. Ce statut peut être attribué aux problèmes qui sont impossibles à reproduire ou qui ne sont plus d’actualité dans une version de développement du logiciel, alors qu’aucun correctif spécifique n’a été installé pour résoudre le problème. Pour d’autres explications, reportez-vous à la section Informations supplémentaires correspondant au problème.
|
Informations supplémentaires
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)
Étapes pour reproduire
ID de bogue: BUG-000094187
Logiciel:
- ArcSDE/Enterprise Geodatabase