SQLServerSelectLogin2

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The SQLServerSelectLogin2 function creates a login dialog that is used by the default script. It lets the targeted end user specify which SQL Server should be used for the current connection, as well as which login credential should be used. The dialog displays a combo box that contains a list of SQL Servers accessed through DSNs. The end user can type a server name in the combo box or click the Browse button next to the Server Name combo box; clicking this button displays a list of all SQL Servers that are available on the network. The end user has the option to use Windows login credentials or enter a SQL Server login ID and password.

When bShowCxnName is set to TRUE, the dialog shows the connection name that is associated with the connection information. In addition, when bShowDBCatalog is set to TRUE, the dialog allows the end user to specify which database catalog should be used for the current connection. The end user can type a catalog name in the edit box or click the Browse button next to the name of database catalog edit box. Clicking the Browse button displays a list of all database catalogs that are available on the specified database server.

Syntax

SQLServerSelectLogin2( szConnection, svServer, svUser, svPassword, bvWindowsLogin, svCatalog, bShowCxnName, bShowDBCatalog );

Parameters

SQLServerSelectLogin2 Parameters

Parameter

Description

szConnection

Specifies the SQL Server connection.

szServer

Specifies the default server to initially display in the Server combo box. Once the dialog function returns, this parameter contains the server name the end user selected or entered in the Server combo box.

This parameter supports alias names for SQL Server database connections.

svUser

Specifies the default string to display in the Login ID edit box. Once the dialog function returns, this parameter contains the Login ID that the end user entered in the edit box. This information is only pertinent if the end user selected to use SQL Login instead of Windows credentials.

svPassword

Specifies the default string to display in the Password edit field. Once the dialog function returns, this parameter contains the Password that the end user entered in the edit field. This information is only pertinent if the end user selected to use SQL Login instead of Windows credentials.

bvWindowsLogin

Specifies the initial state of the radio buttons specifying login using Windows credentials vs. SQL Server credentials. When this is TRUE, the password and login ID fields are disabled. When it is FALSE, indicating that SQL Server credentials are to be used, the password and login fields are enabled.

Once the function returns, this parameter contains TRUE if the Windows credentials radio button was specified by the end user and FALSE if the SQL Server credentials radio was selected instead.

svCatalog

Specifies the name of the database catalog.

bShowCxnName

Specifies whether the dialog should show the name of the connection that is associated with the connection information. Pass one of the following predefined constants in this parameter:

TRUE—Show the name of the connection.
FALSE—Do not show the name of the connection.

bShowDBCatalog

Specifies whether the end user can select which database catalog should to be used for the current connection. Pass one of the following predefined constants in this parameter:

TRUE—Allow the end user to select which database catalog should to be used for the current connection. The end user can type a catalog name in the edit box or click the Browse button next to the name of database catalog edit box. Clicking this Browse button displays a list of all database catalogs that are available on the specified database server.
FALSE—Do not allow the end user to select which database catalog should to be used for the current connection.

Return Values

SQLServerSelectLogin2 Return Values

Return Value

Description

NEXT

The end user selected the Next button.

BACK

The end user selected the Back button.

< ISERR_SUCCESS

The dialog could not be displayed.