' Remove a view from the database.
Public Sub DropView( _
ByVal connectionString As String, _
ByVal schema As String, _
ByVal viewName As String) _
Implements Microsoft.Web.Management.DatabaseManager.IDbViewManager.DropView
' Create a new database connection.
Dim connection As OleDbConnection = New OleDbConnection(connectionString)
' Create the SQL for the CREATE VIEW statement.
Dim dropView As String = String.Format("DROP VIEW {0}", EscapeName(viewName))
' Create an OLEDB command object.
Dim command As OleDbCommand = New OleDbCommand(dropView, connection)
' Open the database connection.
connection.Open()
' Execute the SQL statement.
command.ExecuteNonQuery()
End Sub