InstallShield 2016 » InstallScript Language Reference
Project • This information applies to InstallScript projects.
The SQLRTConnect2 function establishes a connection. This function must be called before file transfer if the connection is to be used to run scripts during installation. SQLRTConnect2 returns the database server name when it fails to establish the connection.
Note • The SQLRTConnect2 function uses SQLRT.dll; therefore, it can be called only after SQLRTInitialize2 has already been called. To learn more, see Using the SQL Run-Time Functions in InstallScript and InstallScript MSI Projects.
Syntax
SQLRTConnect2( szConnection, szServer, bWinLogin, szUser, szPassword, szDatabaseServer );
Parameters
Parameter |
Description |
szConnection |
Specifies the name of the connection that you created in the SQL Scripts view. |
szServer |
Specifies the SQL Server. |
bWinLogin |
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 SQL Server login information. |
szPassword |
Specifies the password associated with a user account. |
szDatabaseServer |
Specifies the database server. |
Return Values
Return Value |
Description |
>=ISERR_SUCCESS |
This function was able to establish a connection. |
<ISERR_SUCCESS |
This function failed to establish a connection. |
SQL_ERROR_NOT_INITIALIZED (-10) |
SQLRT.dll is not loaded. |
Additional Information
If you want to be able to specify which catalog to connect to, replace the SQLRTConnect2 function call in the OnSQLServerInitialize event with the SQLRTConnectDB function call. For more information, see SQLRTConnectDB.
See Also
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |