|Navigation: Templates > Templates by Topic > ADO > ADO Extensions >====== ADO Login Extension Template ======
The ADO Login Extension template is used with the ADO Login procedure to establish the method and source of connecting to an ADO source.
The following template prompts are provided:
Login Procedure builds the connection string from:
There are essentially two sources of Connection String storage.
1.Select UserID, Password, and Server prompt at runtime if the user will be required to login each time the application is loaded (the ADO Login procedure is always the first procedure called by default).
Number of retries allowed
Enter a number here to set the number of user login attempts.
Display a message if retries exceeded
Check this box to pop up a message box if the user has exceeded the number of login attempts.
Message Box caption
Enter text that will be displayed in the message window's title bar.
Enter the message text to display to the user when login attempts have been exceeded.
Return from procedure after Message call
Check this box to automatically return after closing the message window
Connection string data
After the User is validated, the connection string is generated from one of the following methods:
Select a table name from the drop list provided. If the table is a valid ADO file type, the connection string will automatically be read and displayed in the text box the follows.
From UDL file
If the user login is successful, the ADO connection string will be read from an external UDL (Universal Data Link) file name that you specify here. Manually enter a valid UDL file, or use the ellipsis to select one from the popup file dialog.
Select this option, and press the Connection Builder button to invoke the data link properties interface and build your ADO connection string. The connection string will be stored by the Login Procedure.
Select this option If you wish to manually enter a connection string, or paste it from an alternative source, and a store it locally in the Login Procedure.
2.If you select UDL File as the connection string source, a user login is not required. The application attempts to read from the UDL file name you specify.
Check the Data Link Dialog can be displayed to the user check box to allow a connection dialog to be displayed when attempting to connect to the data source. If left unchecked, the data connection process is silent (no indication of connection attempt is shown to the user). You should only leave this check box unchecked if you are sure that your ADO connection is from a reliable source.
Call an Error procedure if Connection failed
Check this box if you would like to call a special procedure that will display a custom message and possible reasons for the connection failure. In the ADO Error Procedure drop combo, enter the name of the procedure that will be used, or select from an existing procedure in the drop list.