Поделиться через


Метод GetTextForScript (ScriptingOptions, Boolean, String[], Boolean)

Gets the text of script object.

Пространство имен:  Microsoft.SqlServer.Management.Smo
Сборка:  Microsoft.SqlServer.Smo (в Microsoft.SqlServer.Smo.dll)

Синтаксис

'Декларация
Protected Function GetTextForScript ( _
    so As ScriptingOptions, _
    forCreate As Boolean, _
    expectedObjectTypes As String(), _
    forceCheckNameAndManipulateIfRequired As Boolean _
) As String
'Применение
Dim so As ScriptingOptions
Dim forCreate As Boolean
Dim expectedObjectTypes As String()
Dim forceCheckNameAndManipulateIfRequired As Boolean
Dim returnValue As String

returnValue = Me.GetTextForScript(so, _
    forCreate, expectedObjectTypes, _
    forceCheckNameAndManipulateIfRequired)
protected string GetTextForScript(
    ScriptingOptions so,
    bool forCreate,
    string[] expectedObjectTypes,
    bool forceCheckNameAndManipulateIfRequired
)
protected:
String^ GetTextForScript(
    ScriptingOptions^ so, 
    bool forCreate, 
    array<String^>^ expectedObjectTypes, 
    bool forceCheckNameAndManipulateIfRequired
)
member GetTextForScript : 
        so:ScriptingOptions * 
        forCreate:bool * 
        expectedObjectTypes:string[] * 
        forceCheckNameAndManipulateIfRequired:bool -> string 
protected function GetTextForScript(
    so : ScriptingOptions, 
    forCreate : boolean, 
    expectedObjectTypes : String[], 
    forceCheckNameAndManipulateIfRequired : boolean
) : String

Параметры

  • forCreate
    Тип: System. . :: . .Boolean
    A Boolean value that specifies whether the script is used to create database objects.
  • expectedObjectTypes
    Тип: array<System. . :: . .String> [] () [] []
    An array of strings that specify the expected object types.
  • forceCheckNameAndManipulateIfRequired
    Тип: System. . :: . .Boolean
    A Boolean value that specifies whether to check for correctness and modify if required.

Возвращаемое значение

Тип: System. . :: . .String
A string value that contains the script.