次の方法で共有


XmlSchemaCollections プロパティ

XmlSchemaCollection オブジェクトのコレクションを表します。各 XmlSchemaCollection オブジェクトは、データベースで定義された XML スキーマを表します。

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

構文

'宣言
<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,  _
    GetType(XmlSchemaCollection))> _
Public ReadOnly Property XmlSchemaCollections As XmlSchemaCollectionCollection
    Get
'使用
Dim instance As Database
Dim value As XmlSchemaCollectionCollection

value = instance.XmlSchemaCollections
[SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, 
    typeof(XmlSchemaCollection))]
public XmlSchemaCollectionCollection XmlSchemaCollections { get; }
[SfcObjectAttribute(SfcContainerRelationship::ObjectContainer, SfcContainerCardinality::ZeroToAny, 
    typeof(XmlSchemaCollection))]
public:
property XmlSchemaCollectionCollection^ XmlSchemaCollections {
    XmlSchemaCollectionCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, 
    typeof(XmlSchemaCollection))>]
member XmlSchemaCollections : XmlSchemaCollectionCollection
function get XmlSchemaCollections () : XmlSchemaCollectionCollection

プロパティ値

型: Microsoft.SqlServer.Management.Smo. . :: . .XmlSchemaCollectionCollection
データベースで定義されたすべての XML スキーマを表す XmlSchemaCollectionCollection オブジェクト。

説明

このコレクションを使用し、XML スキーマ コレクションの名前を指定することによって、特定の XML スキーマ コレクションを参照できます。新しい XML スキーマ コレクションをこのコレクションに追加するには、XML スキーマ コレクション コンストラクター XmlSchemaCollection を呼び出します。

使用例

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server

'Reference the AdventureWorks database.
Dim db As Database
db = srv.Databases("AdventureWorks")

'Display all the XML schema collections in the database.
Dim xsc As XmlSchemaCollection
For Each xsc In db.XmlSchemaCollections
   Console.WriteLine(xsc.Name)
Next