' List All the Tables in a SQL Server Database

' SQL Server 2000 : Yes

strDBServerName = "."
strDBName = "Northwind"

Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName

Set objDB = objSQLServer.Databases(strDBName)
Set colTables = objDB.Tables
For Each objTable In colTables
   WScript.Echo "Table Name: "    & objTable.Name
Next

search for scripts

VbsEdit contains all these sample scripts!





Home   Scripts

Copyright © 2001-2019 adersοft