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


Application.SchemaName Property

Gets or sets the database schema for all application database objects.

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

Синтаксис

'Декларация
Public Property SchemaName As String
public string SchemaName { get; set; }
public:
property String^ SchemaName {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_SchemaName ()

/** @property */
public void set_SchemaName (String value)
public function get SchemaName () : String

public function set SchemaName (value : String)

Значение свойства

A String, between 1 and 128 characters in length, containing the name of the database schema for application objects.

Замечания

Изменения текста5 декабря 2005 г.

You use this property along with the DatabaseName property to specify the database and schema for application objects.

Specify this property only if you are creating a new application. Existing applications already have a schema, and the schema name cannot be changed after creating the application. If you attempt to change a schema name, NMO throws an exception.

If you use the Application(Instance,String) constructor, the default schema is dbo. If you use the default constructor, you must set this property.

Пример

The following example shows how to set the name of the application database and the schema for application objects:

myApplication.DatabaseName = "MyInstMyApp";
myApplication.SchemaName = "MyAppSchema";
myApplication.DatabaseName = "MyInstMyApp"
myApplication.SchemaName = "MyAppSchema"

Синхронизация потоков

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

Application Class
Application Members
Microsoft.SqlServer.Management.Nmo Namespace
Application.DatabaseName Property

Другие ресурсы

SchemaName Element (ADF)