SQLRTServerValidate

InstallShield 2016 » InstallScript Language Reference

Project • This information applies to InstallScript MSI projects.

The SQLRTServerValidate function tests connections specified in the installation.

Note • If you want to call any built-in SQL-related function before the OnSQLServerInitialize event handler is called in an InstallScript project or the OnSQLLogin event handler is called in an InstallScript MSI project, call the SQLRTInitialize2 function first. To learn more, see Using the SQL Run-Time Functions in InstallScript and InstallScript MSI Projects.

Syntax

SQLRTServerValidate\( hInstall );

Parameters

SQLRTServerValidate Parameters

Parameter

Description

hInstall

Specifies the handle to the installation.

When IS_SQLSERVER_CONNECTIONS_TO_VALIDATE is specified, only the connections that are specified as the value of that Windows Installer property are tested.

Return Values

SQLRTServerValidate Return Values

Return Value

Description

=ISERR_SUCCESS

This function was able to establish a connection.

SQL_ERROR_NOT_INITIALIZED

ISSQLSRV.dll is not loaded.

Additional Information

The result is used to set the value of the IS_SQLSERVER_STATUS property. Possible values are listed in the following table.

IS_SQLSERVER_STATUS Property Values

Return Value

Description

0

The function was able to establish one or more connections.

1

The function failed to establish a connection.

2

The function was able to establish a connection, but it failed to retrieve the product version from the target database server.

3

The function was able to establish a connection, but the version requirement was not met.

4

The function was able to establish a connection, but MSDE or the Express version was not allowed.

5

The function was able to establish a connection, but it failed to retrieve the schema version from the target database catalog.

6

The function was able to establish a connection, but it failed to set the schema version to the target database catalog.

7

The function could not find the specified ODBC driver.

8

The function was able to establish a connection to the default database catalog, but it failed to create the target database catalog (when Create Catalog If Absent check box in the SQL Scripts view is selected).

9

The function was able to establish a connection to the default database catalog, but it failed to connect to the target database catalog.

10

The function could not find a valid record in ISSQLDBMetaData table.

See Also