共用方式為


Server.DefaultTextMode 屬性

Gets or sets the Boolean property value that specifies whether the default text mode is set for the instance of SQL Server.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Property DefaultTextMode As Boolean 
    Get 
    Set
'用途
Dim instance As Server 
Dim value As Boolean 

value = instance.DefaultTextMode

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

屬性值

型別:System.Boolean
A Boolean value that specifies the whether the default text mode is set for the instance of SQL Server.If True, the default text mode is set to True. Otherwise, false.

備註

The DefaultTextMode is an SMO setting that specifies the default value for the TextMode property of all the database objects on the instance of SQL Server. The View object, for example, supports the TextMode property. The DefaultTextMode sets the default value of this property on the instance of SQL Server.

The TextMode property specifies whether header information is generated automatically for SMO database objects that have a Text property. In SMO, the View object requires you to specify the definition of the view by using a Transact-SQL statement in the Text property.

範例

C#

srv.DefaultTextMode = True

PowerShell

$srv.DefaultTextMode = $TRUE

請參閱

參考

Server 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

設定屬性

管理伺服器