EPUB | CHM | PDF

TPSQLDatabase.Properties.LoginPrompt

Top Previous Next

Specifies whether a dialog appears immediately before opening a new connection.

Syntax:

property LoginPrompt: Boolean;

Description:

Set LoginPrompt to True to provide support when establishing a connection. When LoginPrompt is True, a dialog appears to prompt users for a name and password. When this dialog appears depends on the type of connection component.

For TPSQLDatabase, the dialog appears after the BeforeConnect event and before the AfterConnect event, unless you supply an OnLogin event handler.

If there is an OnLogin event handler, that event occurs in place of the dialog. If correct values for the user name and password are not supplied in the dialog or by the OnLogin event handler, the connection fails.

This OnLogin event does not fire unless LoginPrompt is set to True.

When LoginPrompt is False, the application must supply user name and password values programmatically.

Storing hard-coded user name and password entries as property values or in code for an OnLogin event handler can compromise server security.