OnReadCredentials - cConnection

Reads the user name, password and trusted connections flag from the INI file

Type: Event

Parameters: String sSection String sId Handle hoIni String ByRef sUID String ByRef sPWDEncrypted Boolean ByRef bTrusted

ParameterDescription
sSectionINI file section
sIdConnection ID
hoIniHandle of the cIniFile object
sUID (ByRef)User Id
sPWDEncrypted (ByRef)Password
bTrusted (ByRef)Use Trusted Connection?


Syntax
Procedure OnReadCredentials String sSection String sId Handle hoIni String ByRef sUID String ByRef sPWDEncrypted Boolean ByRef bTrusted

Description

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.