







A Pure Object-oriented Domain Model by a DB Guy, Part 2
n the previous article (Part 1, see left column) I showed the diagram illustrated in Figure 1. However, I didn’t say very much about it, so now is a good
n the previous article (Part 1, see left column) I showed the diagram illustrated in Figure 1. However, I didn’t say very much about it, so now is a good
‘ Returns an array with the installed SQL Server databases’ The first param must be a valid connection string to the ‘master’ database’ Requires Imports System.Data.SqlClient” Example:’ Dim databases() As
‘ Returns the names of all the columns in the specified database table. The ‘ database is identified by the input connection string’ Requires Imports System.Data.OleDb” Example:’ Dim columns() As
‘ Returns the names of all the tables in the database identified by the input ‘ connection string’ Requires Imports System.Data.OleDb” Example:’ Dim tables() As String = GetDatabaseTables’ (“PROVIDER=Microsoft.Jet.OLEDB.4.0; Data
‘ Returns an array with the names of the installed COM+ Applications’ Params: the name of the server – defaults to the local server’ Requires a reference to the COM+
‘ Returns whether a SQL Server DB with the specified name is present’ The first param must be a valid connection string to the ‘master’ database’ Requires Imports System.Data.SqlClient” Example:’
‘ Restarts the default web site in IIS Sub RestartDefaultSite() Dim p As New Process() p.StartInfo.FileName = “net.exe” p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden ‘ set the parameters to STOP the service p.StartInfo.Arguments