version 1.5
OC Login dialog Longint
| Parameter | Type | Description | ||||
| This command does not require any parameters | ||||||
| Function result | Longint | Connection ID, or | ||||
| 0 = the user clicks Cancel in the dialog, or | ||||||
| -1 = an error occurs | ||||||
Description
The OC Login dialog function displays the Connect to a Data Source dialog box and allows the user to choose a data source and to specify a login name and password.
If the user clicks OK, OC Login dialog logs in and returns a connection ID. If the user clicks Cancel, OC Login dialog returns 0. If an error occurs, OC Login dialog returns -1.
The user chooses a data source from the data source pop-up menu, which lists the data sources that have been installed on the user's machine by installing specific drivers for the data sources. 4D ODBC saves the name of the server chosen by the user in its resources. It also saves the user's name if the Save Name check box has been selected and the user's password if the Save Password check box has been selected.
Warning: When security is important, it is recommended that the user not save the password. If the user saves the password, anyone with access to the user's 4D ODBC database can connect to the server. In addition, the password is not encrypted while it is being saved.
See Also
System Variables and Sets
If the user clicks OK in the dialog box, the OK system variable is set to 1. If the user clicks Cancel, it is set to 0.
Error Handling
If an error occurs, OC Login dialog returns -1.