Aracılığıyla paylaş


Database.XmlSchemaCollections Özelliği

Temsil eden bir koleksiyon , XmlSchemaCollection nesneler.Her XmlSchemaCollection nesnesini temsil eden bir xml şeması tanımlı veritabanı.

Ad Alanı:  Microsoft.SqlServer.Management.Smo
Derleme:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo içinde.dll)

Sözdizimi

'Bildirim
<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,  _
    GetType(XmlSchemaCollection))> _
Public ReadOnly Property XmlSchemaCollections As XmlSchemaCollectionCollection
    Get
'Kullanım
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

Özellik Değeri

Tür: Microsoft.SqlServer.Management.Smo.XmlSchemaCollectionCollection
A XmlSchemaCollectionCollection nesnesini temsil eden tüm xml şemaları tanımlı veritabanı.

Açıklamalar

Özel xml şeması koleksiyons başvuru yapabilirsiniz bunu kullanarak koleksiyon xml şemasının adını belirterek koleksiyon.Yeni bir xml şeması eklemek için koleksiyon için koleksiyon, xml şeması çağrısı koleksiyon kurucusu XmlSchemaCollection.

Örnekler

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

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

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

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2008R2")

Foreach ($xsc in $db.XmlSchemaCollections)
{
   Write-Host $xsc.Name
}