ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / SchemaBuilder Class / DeleteGeodatabase Method / DeleteGeodatabase(FileGeodatabaseConnectionPath) Method
Represents the physical path of the file ArcGIS.Core.Data.Geodatabase.
Example

In This Topic
    DeleteGeodatabase(FileGeodatabaseConnectionPath) Method
    In This Topic
    Deletes the file ArcGIS.Core.Data.Geodatabase at the specified path.
    Syntax
    public static void DeleteGeodatabase( 
       FileGeodatabaseConnectionPath fileGeodatabaseConnectionPath
    )
    Public Overloads Shared Sub DeleteGeodatabase( _
       ByVal fileGeodatabaseConnectionPath As FileGeodatabaseConnectionPath _
    ) 

    Parameters

    fileGeodatabaseConnectionPath
    Represents the physical path of the file ArcGIS.Core.Data.Geodatabase.
    Exceptions
    ExceptionDescription
    The length of the local path is greater than 215 characters.
    fileGeodatabaseConnectionPath is null.
    The input path does not contain a file ArcGIS.Core.Data.Geodatabase.
    A geodatabase-related exception has occurred.
    Example
    Deleting a File Geodatabase
    public void DeleteFileGeodatabaseSnippet()
    {
      // Create a FileGeodatabaseConnectionPath with the name of the file geodatabase you wish to delete
      FileGeodatabaseConnectionPath fileGeodatabaseConnectionPath = new FileGeodatabaseConnectionPath(new Uri(@"C:\Path-To-File-Geodatabase\YourName.gdb"));
    
      // Delete the file geodatabase
      SchemaBuilder.DeleteGeodatabase(fileGeodatabaseConnectionPath);
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also