0

I developed an Addin in ArcGIS Pro 2.5 where I am using connection files to open database connections at runtime. So far that worked perfect. The connection files are stored on a network drive, referenced in the Addin with absolute paths.

DatabaseConnectionFile connectionFileValidering = new DatabaseConnectionFile(new Uri(AppSettings.Default.sde_validation));

Now that I am doing some maintenance on the Addin I am running into the following error when trying to open the enterprise database:

Database test_db = new Database(connectionFileValidation);

I am getting the following error.

'Database test_db = new Database(connectionFileValidation)' threw an exception of type 'ArcGIS.Core.Data.GeodatabaseException' Data: {System.Collections.ListDictionaryInternal} HResult: -2146233088 HelpLink: null InnerException: {"Error HRESULT E_FAIL has been returned from a call to a COM component."} Message: "A geodatabase exception has occurred." Source: "ArcGIS.Core" StackTrace: " at ArcGIS.Core.Data.Database..ctor(DatabaseConnectionFile databaseConnectionFile)" TargetSite: {Void .ctor(ArcGIS.Core.Data.DatabaseConnectionFile)}

With respect to the error message I found some stuff that is not related to ArcGIS, but did not help either.

Can you point me the direction of a solution?

1 Answer 1

-1

I may have had the same problem in QGIS, where I had to use following:

db.setConnectOptions("service=yourservice")

Maybe it will help to find the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.