SQLRTGetConnectionInfo
InstallShield 2023 » InstallScript Language Reference
Project:This information applies to the following project types:
| • | InstallScript |
| • | InstallScript MSI |
The SQLRTGetConnectionInfo function retrieves strings containing the connection information (the default server, database, default user name, and default password).
Note:The SQLRTGetConnectionInfo function uses SQLRT.dll in InstallScript projects and ISSQLSRV.dll in 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
SQLRTGetConnectionInfo( szConnection, szServer, szDB, szUser, szPassword );
Parameters
|
Parameter |
Description |
|
szConnection |
Specifies the SQL Server connection |
|
szServer |
Specifies the SQL Server. |
|
szDB |
Specifies the SQL Server database. |
|
szUser |
Specifies the SQL Server login information. |
|
szPassword |
Specifies the password associated with a user account. |
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