ArcGIS Pro 3.7 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 Overloads Shared Sub DeleteGeodatabase( _
       ByVal fileGeodatabaseConnectionPath As FileGeodatabaseConnectionPath _
    ) 
    public static void DeleteGeodatabase( 
       FileGeodatabaseConnectionPath 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
    {
      await QueuedTask.Run(() =>
      {
        // 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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also