SQLRTPutConnectionInfo2

InstallShield 2016 » InstallScript Language Reference

Project • This information applies to the following project types:

InstallScript
InstallScript MSI

The SQLRTPutConnectionInfo2 function sets the connection information (the default server, default database catalog, default user name, and default password). This is useful in situations when you need to recall what an end user previously entered, like use of the Back button.

Note • The SQLRTPutConnectionInfo2 function uses SQLRT.dll for InstallScript projects and ISSQLSRV.dll for InstallScript MSI projects; 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

SQLRTPutConnectionInfo2( szConnection, szServer, svDBCatalog, szUser, szPassword );

Parameters

SQLRTPutConnectionInfo2 Parameters

Parameter

Description

szConnection

Specifies the SQL Server connection.

szServer

Specifies the SQL Server.

svDBCatalog

Specifies the name of the SQL database catalog.

szUser

Specifies the SQL Server login information.

szPassword

Specifies the password associated with a user account.

Return Values

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

See Also