GeoData service GetVersions method
Gets information on the versions in the geodatabase.
GetVersions()
Return Value
An array of GPVersionInfo objects.
Remarks
This method will execute successfully when using a versioned ArcSDE geodatabase. If working with a non-ArcSDE geodatabase (e.g. file geodatabase) a call to this method will return an exception.
Examples
C#
GeodataService_GeodataServer geodataservice = new GeodataService_GeodataServer();
geodataservice.Url = "http://localhost:6080/arcgis/services/GeodataService/GeodataServer";
try
{
GPVersionInfo[] gpversioninfos = geodataservice.GetVersions();
foreach (GPVersionInfo gpvi in gpversioninfos)
{
string versionname = gpvi.VersionName;
esriVersionAccess access = gpvi.Access;
}
}
// If not an ArcSDE geodatabase, "Error processing server request" will be returned.
catch (System.Web.Services.Protocols.SoapException soapex)
{
string message = soapex.Message;
}
catch (Exception ex) { }
finally
{
geodataservice.Dispose();
}
VB.NET
Dim geodataservice As GeodataService_GeoDataServer = New GeodataService_GeoDataServer()
geodataservice.Url = "http://localhost:6080/arcgis/services/GeodataService/GeodataServer"
Try
Dim gpversioninfos() As GPVersionInfo = geodataservice.GetVersions()
Dim gpvi As GPVersionInfo
For Each gpvi In gpversioninfos
Dim versionname As String = gpvi.VersionName
Dim access As esriVersionAccess = gpvi.Access
Next
' If not an ArcSDE geodatabase, "Error processing server request" will be returned.
Catch soapex As System.Web.Services.Protocols.SoapException
Dim message As String = soapex.Message
Finally
geodataservice.Dispose()
End Try
Java
GPVersionInfo[] gpVersionInfoss = geoDataService.getVersions();
2/28/2020