MobileGeodatabaseConnectionPath Class
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
}
}
Deleting a Mobile Geodatabase
public void DeleteMobileGeodatabase()
{
// Create a MobileGeodatabaseConnectionPath with the name of the mobile geodatabase you wish to delete
MobileGeodatabaseConnectionPath mobileGeodatabaseConnectionPath =
new MobileGeodatabaseConnectionPath(new Uri(@"C:\Path-To-Mobile-Geodatabase\YourName.geodatabase"));
// Delete the mobile geodatabase
SchemaBuilder.DeleteGeodatabase(mobileGeodatabaseConnectionPath);
}
System.Object
ArcGIS.Core.Data.Connector
ArcGIS.Core.Data.MobileGeodatabaseConnectionPath
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.