' Sample script that lists all the views in a given SQL Server DB.
' SQL Server 2000 : Yes
strDBServerName = "."
strDBName = "Northwind"
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName
Set colViews = objSQLServer.Databases(strDBName).Views
For Each objView In colViews
WScript.Echo objView.Name
Next