SQLDatabaseBrowse

InstallShield 2016 » InstallScript Language Reference

Project • This information applies to the following project types:

InstallScript
InstallScript MSI

The SQLDatabaseBrowse function creates a dialog that lets the end user display a list of all database catalogs that are available on the specified database server. This function calls SQLRTGetDatabases, which uses SQLRT.dll for InstallScript projects and ISSQLSRV.dll for InstallScript MSI projects.

Note • The SQLDatabaseBrowse function uses settings from the SQL settings file; therefore, it can be called only after SQLRTInitialize2 has already been called.

Syntax

SQLDatabaseBrowse( szConnection, szServer, bvWindowsLogin, szUser, szPassword, svDBCatalog );

Parameters

SQLDatabaseBrowse Parameters

Parameter

Description

szConnection

Specifies the name of the connection that you created in the SQL Scripts view.

svServer

When the function returns, this parameter contains the string with the server name the end user selected.

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.

szUser

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 field. This information is only pertinent if the end user selected to use SQL Login instead of Windows credentials.

szPassword

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.

svDBCatalog

Specifies the name of the SQL database catalog.

Return Values

SQLDatabaseBrowse Return Values

Return Value

Description

NEXT

The end user clicked the OK button.

CANCEL

The end user clicked the Cancel button.

< ISERR_SUCCESS

The dialog could not be displayed.

See Also