Skip to content

OnWriteCredentials - cConnection

Writes credentials to the connections INI file

Type: Event

Parameters

Parameter Type Description
sSection String INI file section
sId String Connection ID
hoIni Handle Handle of the cIniFile object
sUID String User Id
sPWDEncrypted String Password
bTrusted Boolean Use Trusted Connection?

Syntax

Procedure OnWriteCredentials String sSection String sId Handle hoIni String sUID String sPWDEncrypted Boolean 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.