ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / SchemaBuilder Class / CreateGeodatabase Method / CreateGeodatabase(MobileGeodatabaseConnectionPath) Method
Represents the physical path to create the mobile ArcGIS.Core.Data.Geodatabase.
Example

In This Topic
    CreateGeodatabase(MobileGeodatabaseConnectionPath) Method
    In This Topic
    Creates a new mobile ArcGIS.Core.Data.Geodatabase at the specified path
    Syntax

    Parameters

    mobileGeodatabaseConnectionPath
    Represents the physical path to create the mobile ArcGIS.Core.Data.Geodatabase.

    Return Value

    The newly created mobile ArcGIS.Core.Data.Geodatabase
    Exceptions
    ExceptionDescription

    The path contains an invalid character or the geodatabase name is invalid.

    -or-

    The length of the local path is greater than 215 characters.

    mobileGeodatabaseConnectionPath is null.
    The name of the file ArcGIS.Core.Data.Geodatabase contains a colon.
    The file ArcGIS.Core.Data.Geodatabase already exists.
    A geodatabase-related exception has occurred.
    Example
    Creating a Mobile Geodatabase
    public void CreateMobileGeodatabase()
    {
      // Create a MobileGeodatabaseConnectionPath with the name of the mobile geodatabase you wish to create
      MobileGeodatabaseConnectionPath mobileGeodatabaseConnectionPath = new MobileGeodatabaseConnectionPath(new Uri(@"C:\Path-To-Mobile-Geodatabase\YourName.geodatabase"));
    
      // Create and use the mobile geodatabase
      using (Geodatabase geodatabase = SchemaBuilder.CreateGeodatabase(mobileGeodatabaseConnectionPath))
      {
        // Create additional schema here
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also