Views プロパティ
名前空間: Microsoft.SqlServer.Management.Smo
アセンブリ: Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)
構文
'宣言
<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, _
GetType(View))> _
Public ReadOnly Property Views As ViewCollection
Get
'使用
Dim instance As Database
Dim value As ViewCollection
value = instance.Views
[SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,
typeof(View))]
public ViewCollection Views { get; }
[SfcObjectAttribute(SfcContainerRelationship::ObjectContainer, SfcContainerCardinality::ZeroToAny,
typeof(View))]
public:
property ViewCollection^ Views {
ViewCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,
typeof(View))>]
member Views : ViewCollection
function get Views () : ViewCollection
プロパティ値
型: Microsoft.SqlServer.Management.Smo. . :: . .ViewCollection
データベースで定義されたすべてのビューを表す ViewCollection オブジェクト。
使用例
'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 users in the database.
Dim us As User
For Each us In db.Users
Console.WriteLine(us.Name)
Next