Select to view content in your preferred language

Get numbers from a geodatabase sequence using Pro SDK 3.3

199
1
3 weeks ago
azlotin
Emerging Contributor

I would like to return numbers from a geodatabase sequence using Pro SDK. I have searched the SDK reference and could not find anything. Can anyone confirm that at this time geodatabase sequences can only be queried via attribute rules? If that is the case, will future releases of Pro SDK support this functionality? Thanks!

0 Kudos
1 Reply
sjones_esriau
Esri Contributor

Hi,

Assuming you want to get NEXTVAL from a DBMS sequence, you could:

Create a DatabaseClient object then call ExecuteStatement with the sql string via the Pro API.
You would have to write into a temp table then read from that table to get the value. Messy.

Use SqlCommand and SqlDataReader within .net
https://stackoverflow.com/questions/21709305/how-to-directly-execute-sql-query-in-c

0 Kudos