共用方式為


TSqlObject.TryGetScript(String) Method

Definition

Attempts to generate a CREATE script from the objects AST. AST generation is only supported for top-level objects, with certain objects such as the DatabaseOptions and inline constraints not supporting AST generation even though they are top level types. If it's unknown whether the object is capable of being scripted then the TryGetAst(TSqlScript) method should be used instead.

public bool TryGetScript (out string objectScript);
member this.TryGetScript : string -> bool
Public Function TryGetScript (ByRef objectScript As String) As Boolean

Parameters

objectScript
String

The DDL Creation script for the object

Returns

True if the DDL creation script was created.

Applies to