Hi -
I'm trying to use sde.next_rowid to get an OID for a new row to be created in a table registered and versioned within a SQL*Server 10.8.1 geodatabase. Here's my syntax:
DECLARE @next_oid AS BIGINT
EXEC sde.next_rowid 'gisadmin', 'ASSEMBLY', @next_oid OUTPUT
Here's the error I receive:
Msg 8144, Level 16, State 2, Procedure gisadmin.i36_get_ids, Line 0 [Batch Start Line 13]
Procedure or function i36_get_ids has too many arguments specified.
I'm afraid I'm stumped. The syntax I'm using matches what has been documented here (https://community.esri.com/t5/geodatabase-questions/using-sde-next-rowid-in-t-sql/td-p/761989) and other places. Any suggestions would be greatly appreciated.
Thx,
Ed
Does declaring @next_oid as "int" rather than "bigint" change anything?
David -
Thanks for the reply. I had tried using INT prior to BIGINT. Same results.
Ed
I looked for bugs related to this problem and Gemini told me this:
Now, I'm using ArcGIS 10.8.1 with SQL*Server version 2022, and I have more than once had Gemini lead me on a wild goose chase, but... any chance anyone knows what "problems" might be referring to?
Thx,
Ed
So... as far as I can tell, this is a bug.
However, I did find that another way to accomplish what I want to do is insert into the _EVW. Below is SQL that worked for me. Interestingly, the procedure "sde.next_globalid" works, while "sde.next_rowid" fails. And, apparently, when inserting into the _EVW the OBJECTID is generated as part of the "insert" operation.
DECLARE @GID uniqueidentifier
EXEC sde.next_globalid @GID OUTPUT
INSERT INTO ASSEMBLY_EVW (GLOBALID,PARENTOBJECTID,UNIT,SUBTYPECD,QUANTITY,DATECREATED)
VALUES (@gid,1408321,'UTSLV',5,1,GETDATE());