次の方法で共有


Bindings プロパティ

バインド ステートメント sp_binddefault および sp_bindrule を、生成されるスクリプトに含めるかどうかを示す Boolean プロパティ値を取得します。値の設定も可能です。このプロパティが適用されるのは、SQL Server テーブルのスクリプト作成時だけです。

名前空間:  Microsoft.SqlServer.Management.Smo
アセンブリ:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)

構文

'宣言
Public Property Bindings As Boolean
    Get
    Set
'使用
Dim instance As ScriptingOptions
Dim value As Boolean

value = instance.Bindings

instance.Bindings = value
public bool Bindings { get; set; }
public:
property bool Bindings {
    bool get ();
    void set (bool value);
}
member Bindings : bool with get, set
function get Bindings () : boolean
function set Bindings (value : boolean)

プロパティ値

型: System. . :: . .Boolean
バインド ステートメント sp_binddefault および sp_bindrule を、生成される Transact-SQL スクリプトに含めるかどうかを示す Boolean 値です。
True の場合、バインド ステートメントがスクリプトに含まれます。False (既定値) の場合、警告トークンは置き換えられません。

説明

Bindings プロパティが適用されるのは、SQL Server テーブルのスクリプト作成時だけです。

使用例

次のコード例では、sp_binddefault と sp_bindrule のバインド ステートメントをスクリプトに含めるように指定します。

Visual Basic

Dim scOps As New ScriptingOptions()
scOps.Bindings = true

PowerShell

$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.Bindings = $TRUE