Feature Service Versioning (setup and use)

1357
1
12-17-2019 07:37 AM
DavidLaMartina
New Contributor III

I'm working on an Add-In that needs to read spatial data from a feature service. Using just a feature service URL, this seems to be working. I can create a Geodatabase object from connection properties derived from the feature service's URI, and then I can get data out of that gdb's tables.

But what if I need to access data from a specific version of a versioned feature service? Right now, IsVersioningSupported() always returns false from a Geodatabase instantiated from a feature service's connection properties. Likewise, if I try to call GetVersionManager() on that Geodatabase object, I get the following error:

"This type of geodatabase (Service) does not support version."

Does this really mean there is no way to programatically access versions of a versioned feature service? Or does it just mean that the feature service in question isn't set up properly for versioning?

Ultimately I'm hoping to find out

1. How to set up a feature service for traditional and branch versioning

2. How to access those versions within the Arc Pro SDK.

Thanks,

David

0 Kudos
1 Reply
RichRuh
Esri Regular Contributor

Hi David,

If you are using traditional versioning, the feature service does not support versioning functionality, as you have pointed out.  You can connect to a particular version by passing that into the connection properties, but there is no way to iterate through what versions are available.

If you set up your enterprise geodatabase to use branch versioning, and enable the Version Management Service when you publish to a feature service, this story changes. IsVersioningSupported() returns true, GetVersionManager() returns an object, and all of the routines on that class work as you would expect.

I hope this helps,

--Rich