SQLServerSelectLogin

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The SQLServerSelectLogin2 function supersedes the SQLServerSelectLogin function.

The SQLServerSelectLogin function creates a dialog that is used by the default script. It allows the targeted end user to specify which SQL Server is to be used for the current connection, along with which login credential should be used. When the dialog is displayed, a combo box shows a list of SQL Servers accessed through DSNs. A Browse button is available to bring up a list of all SQL Servers available on the network or the end user can type a server name into the combo box. Also, the end user has the option to use Windows login credentials or enter a SQL Server login ID and password.

This function is in the SQLRT.obl file for InstallScript projects, and in the SQLCONV.obl file for InstallScript MSI projects. If you are using the SQL Scripts view in InstallShield, the appropriate file is automatically added to your linker settings. However, if you are not using this view, add the appropriate file to your linker settings: On the Build menu, click Settings, and then add it to the Libraries (.obl) box.

Syntax

SQLServerSelectLogin (byref string svServer, byref string svUser, byref string svPassword, byref BOOL bvWindowsLogin );

Parameters

SQLServerSelectLogin Parameters

Parameter

Description

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.

Return Values

SQLServerSelectLogin 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.