Share via


UserDefinedDataType.Rule Property

Gets or sets a SQL Server rule that is bound to the user-defined data type.

This API is not CLS-compliant. 

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.ReadOnlyAfterCreation Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
<SfcReferenceAttribute(GetType(Rule), "Server[@Name = '{0}']/Database[@Name = '{1}']/Rule[@Name='{2}' and @Schema='{3}']",  _
    )> _
<CLSCompliantAttribute(False)> _
Public Property Rule As String 
    Get 
    Set
'Usage
Dim instance As UserDefinedDataType 
Dim value As String 

value = instance.Rule

instance.Rule = value
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)]
[SfcReferenceAttribute(typeof(Rule), "Server[@Name = '{0}']/Database[@Name = '{1}']/Rule[@Name='{2}' and @Schema='{3}']", 
    )]
[CLSCompliantAttribute(false)]
public string Rule { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::ReadOnlyAfterCreation|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase)]
[SfcReferenceAttribute(typeof(Rule), L"Server[@Name = '{0}']/Database[@Name = '{1}']/Rule[@Name='{2}' and @Schema='{3}']", 
    )]
[CLSCompliantAttribute(false)]
public:
property String^ Rule {
    String^ get ();
    void set (String^ value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
[<SfcReferenceAttribute(typeof(Rule), "Server[@Name = '{0}']/Database[@Name = '{1}']/Rule[@Name='{2}' and @Schema='{3}']", 
    )>]
[<CLSCompliantAttribute(false)>]
member Rule : string with get, set
function get Rule () : String 
function set Rule (value : String)

Property Value

Type: System.String
A String value that specifies the bound rule.

Examples

Working with Data Types

See Also

Reference

UserDefinedDataType Class

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Data Types (Database Engine)

CREATE TYPE (Transact-SQL)