ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.Data Namespace / Geodatabase Class / Geodatabase Constructor / Geodatabase Constructor(MobileGeodatabaseConnectionPath)
Holds a valid path to a mobile geodatabase that ends with the .geodatabase extension.
Example

In This Topic
    Geodatabase Constructor(MobileGeodatabaseConnectionPath)
    In This Topic
    Opens a mobile geodatabase with the specified connectionPath. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    connectionPath
    Holds a valid path to a mobile geodatabase that ends with the .geodatabase extension.
    Exceptions
    ExceptionDescription
    The path to the geodatabase is invalid or the geodatabase cannot be opened.
    A geodatabase-related exception has occurred.
    This object must be created within the lambda or delegate passed to QueuedTask.Run, or on a compatible STA thread.
    Example
    Opening a Mobile Geodatabase given the path
    {
      await QueuedTask.Run(() =>
      {
        // Opens a mobile geodatabase. This will open the geodatabase if the folder exists and contains a valid mobile geodatabase.
        using (Geodatabase mobileGeodatabase = new Geodatabase(new MobileGeodatabaseConnectionPath(new Uri(@"C:\Data\LocalGovernment.geodatabase"))))
        {
          Connector connector = mobileGeodatabase.GetConnector();
          if (connector is MobileGeodatabaseConnectionPath mobileConnPath)
          {
            // Get the type of the mobile geodatabase 
            MobileGeodatabaseType type = mobileConnPath.Type;
          }
        }
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also