ArcGIS Pro 2.7 API Reference Guide
GetDatastore Method (GDBProjectItem)

ArcGIS.Desktop.Catalog Namespace > GDBProjectItem Class : GetDatastore Method
Gets the ArcGIS.Core.Data.Datastore associated with the workspace corresponding to ArcGIS.Desktop.Core.Item.Path. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public Datastore GetDatastore()
Public Function GetDatastore() As Datastore

Return Value

A specific ArcGIS.Core.Data.Datastore (e.g., ArcGIS.Core.Data.Geodatabase) associated with the workspace corresponding to ArcGIS.Desktop.Core.Item.Path. If the workspace is not currently supported, an instance of ArcGIS.Core.Data.UnknownDatastore is returned.
Exceptions
ExceptionDescription
The type of data store corresponding to ArcGIS.Desktop.Core.Item.Path is invalid.
If the path to the data store is invalid or the data store cannot be opened or currently not supported.
A geodatabase-related exception has occurred.
This method or property must be called within the lambda passed to QueuedTask.Run
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

GDBProjectItem Class
GDBProjectItem Members