AddSQLScriptEx Method

InstallShield 2016

Project • This information applies to the following project types:

Basic MSI
DIM
InstallScript
InstallScript MSI

Call the AddSQLScriptEx method to add an ISSQLScriptFile entry to a SQL connection. This method generates a valid name from the passed string. The method ensures that the name of the entry that is being added to the ISSQLScriptFile table is unique and less than 47 characters in length.

Syntax

Function AddSQLScriptEx (ByVal sCandidateName As String) As ISWiSQLScript

Parameters

AddSQLScriptEx Method Parameters

Parameter

Description

sCandidateName

Specifies the name of the script that you want to add to the SQL connection.

Note that file names may contain invalid characters or may be too long for the key. However, if you pass a file name in this parameter, the AddSQLScriptEx method creates an entry with a valid key that is based on the file name; the result is the same as if you had added the SQL script to a connection in the SQL Scripts view.

If you specify an empty string (""), the AddSQLScriptEx method generates the ISSQLScriptFile table key with a name such as SQLScript1, SQLScript2, or SQLScript3—the same as if the AddSQLScript method was used to add the ISSQLScriptFile entry.

Return Values

This method returns an ISWiSQLScript object.

Applies To

ISWiSQLConnection