I have sde files to connect to my Oracle database and as long as I use the Database class from ArcGIS.Core.Data the sde file is enough. However, I also need the credentials to issue some SQL commands later on.
The password property of DatabaseConnectionProperties returns the instance and the user name as it should, but the password property only returns an empty string.
Any suggestions on how to get the password read from the sde file?
ArcGIS.Core version 22.214.171.124, runtime version v4.0.30319
You cannot get a password from an SDE file. This is by design. It would be a security risk if you could, because that password could be used to gain access to additional resources beyond the single geodatabase resource.
That sounds logic. However, if I do not read the API wrong: -> get and set???
I mean get would be enough for me.
I'm not positive, but I believe that get only works on a newly created DatabaseConnectionProperties object, not one that has been created from a disk file. I'll investigate and update the documentation in a future release.