The signon dialog behavior has been simplified from the behavior seen in previous iSeries™ Access for Windows® ODBC drivers. The signon dialog behavior is based on how your data source is set up and which ODBC API (SQLConnect, SQLDriverConnect, SQLBrowseConnect) your application uses to connect.
When coding your application you have total control over how the userid, password, and signon dialog prompting will behave. The userid and password that is used is figured out in the following order:
The signon dialog prompting depends on which ODBC API is used by the application to connect. SQLConnect prompts the signon dialog if needed unless the GUI setting for Signon dialog prompting says to never prompt. SQLDriverConnect prompts the signon dialog according to the value of the DriverCompletion. A setting of SQL_DRIVER_NOPROMPT will prevent any signon dialogs from being prompted. A setting of SQL_DRIVER_PROMPT, SQL_DRIVER_COMPLETE or SQL_DRIVER_COMPLETE_REQUIRED will prompt the signon dialog if needed. SQLBrowseConnect prompts the signon dialog if needed.
When coding your ODBC application using ActiveX Data Objects (ADO) the default behavior for prompting is adPromptNever. To prompt differently, set the Prompt property on the Connection object prior to calling the Connection's Open method. For example, the following ADO code would result in prompting only as needed. Adding the SIGNON, UID, or PWD keywords allow you to have more control over the amount of prompting.
Dim conn As New ADODB.Connection conn.Properties("Prompt") = adPromptComplete conn.Open "Provider = MSDASQL;DSN=myODBCDSN;