Program ExploreServer

Example program ExploreServer, shown in Figure 13.4, uses SQL Server’s stored procedures to study a server. It uses the sp_databases stored procedure to list the server’s databases. For each database in the server, it uses sp_tables to list the database’s tables. For each table in the databases, it uses sp_columns to list the table’s columns.

Figure 13.4. Program ExploreServer uses SQL Server’s system stored procedures to list a server’s databases, tables, and columns.

Program ExploreServer uses the code shown in Listing 13.4 to display the server’s structure. When the user selects the File menu’s Server command, the ...

Get Visual Basic® .NET Database Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.