ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data Namespace / MemoryConnectionProperties Class
Members Example

In This Topic
    MemoryConnectionProperties Class
    In This Topic
    Represents the properties used to connect to a memory geodatabase.
    Syntax
    Public NotInheritable Class MemoryConnectionProperties 
       Inherits Connector
    public sealed class MemoryConnectionProperties : Connector 
    Example
    Opens a memory geodatabase
    {
      await QueuedTask.Run(() =>
      {
        // Connects to the default memory geodatabase, if exists otherwise throws exception
        MemoryConnectionProperties memoryConnectionProperties = new MemoryConnectionProperties();
    
        // Alternatively, connects to memory geodatabase named as 'InterimMemoryGeodatabase'
        // MemoryConnectionProperties memoryConnectionProperties = new MemoryConnectionProperties("InterimMemoryGeodatabase");
    
        // Opens the memory geodatabase
        using (Geodatabase geodatabase = new Geodatabase(memoryConnectionProperties))
        {
          // Use memory geodatabase
        }
      });
    }
    Creating a memory Geodatabase
    {
      await QueuedTask.Run(() =>
      {
        // Create the memory connection properties to connect to  default memory geodatabase
        MemoryConnectionProperties memoryConnectionProperties = new MemoryConnectionProperties();
    
        // Alternatively create the memory connection properties to connect to memory geodatabase named as 'InterimMemoryGeodatabase'
        // MemoryConnectionProperties memoryConnectionProperties = new MemoryConnectionProperties("InterimMemoryGeodatabase");
    
        // Creates the new memory geodatabase if it does not exist or connects to an existing one if it already exists
        using (Geodatabase geodatabase = new Geodatabase(memoryConnectionProperties))
        {
          // Create additional schema here
        }
      });
    }
    Deleting a memory Geodatabase
    {
      await QueuedTask.Run(() =>
      {
        // Create the memory connection properties to connect to default memory geodatabase
        MemoryConnectionProperties memoryConnectionProperties = new MemoryConnectionProperties();
    
        // Delete the memory geodatabase
        SchemaBuilder.DeleteGeodatabase(memoryConnectionProperties);
      });
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.Data.Connector
          ArcGIS.Core.Data.MemoryConnectionProperties

    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also