AnsweredAssumed Answered

get path of sde file

Question asked by lichimesriro-ro-esridist Employee on Jun 7, 2017
Latest reply on Jun 23, 2017 by gkmieliauskas_cellexp

Hello for all,
I have a problem and please help me.
I need to get path of sde file for enterprise geodatabase.


Up to 1.3 version for ArcGIS Pro, the Geodatabase class had GetPath() method which returned path for Geodatabase (File Geodatabase, Enterprise Geodatabase and so on) .


Starting with 1.4 version this method is depricated (and return empty string) and it's recomended to work with Conector and appropriate class (DatabaseConnectionFile, DatabaseConnectionProperties and so on)

I need to get path of sde file (Enterprise Geodatabase), but Connector is not DatabaseConnectionFile.
When Geodatabase is Enterprise, the Connector is only DatabaseConnectionProperties-type.
But DatabaseConnectionProperties does not allow to get path of sde file.

(_table.GetDatastore() as Geodatabase).GetConnector() is DatabaseConnectionFile is false

How can I get the path of sde file?

Thanks all,
Laurentiu Ichim