Geodatabase Constructor(DatabaseConnectionFile)
Opens an enterprise geodatabase with the specified connection file.
This method must be called on the MCT. Use QueuedTask.Run.
Opening an Enterprise Geodatabase using sde file path
public async Task OpenEnterpriseGeodatabaseUsingSDEFilePath()
{
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
using (Geodatabase geodatabase = new Geodatabase(new DatabaseConnectionFile(new Uri("path\\to\\sde\\file\\sdefile.sde"))))
{
// Use the geodatabase.
}
});
}
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.