Parameter | Description |
---|---|
sSection | INI file section |
sId | Connection ID |
hoIni | Handle of the cIniFile object |
sUID (ByRef) | User Id |
sPWDEncrypted (ByRef) | Password |
bTrusted (ByRef) | Use Trusted Connection? |
Procedure OnReadCredentials String sSection String sId Handle hoIni String ByRef sUID String ByRef sPWDEncrypted Boolean ByRef bTrusted
The LoadStoredConnections is used to read the connections INI file. The method calls the OnReadCredentials event, which reads the user name, password and trusted connections flag from the INI file.
The StoreConnectionIdCredentials method calls the OnWriteCredentials event to write credentials to the connections INI file.
OnReadCredentials and OnWriteCredentials events contain code (they are not empty). You can replace this code with your own custom code. If you do this, you will almost always augment the OnReadCredentials and OnWriteCredentials as a pair. You might do this to read/write the data to a different location (e.g., registry instead of a connections INI file) or to read/write the data using a special INI key name (e.g., PWD1= instead of PWD=).
If password encryption is used (pbEncryptPassword = True), the password passed into OnReadCredentials and OnWriteCredentials is encrypted.