Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to drop database views. Closes #4.
Use the SQLDropView class to generate a DROP VIEW statement
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
' ___________________________________________________ | ||
' | ||
' © Hi-Integrity Systems 2012. All rights reserved. | ||
' www.hisystems.com.au - Toby Wicks | ||
' ___________________________________________________ | ||
' | ||
|
||
Option Strict On | ||
Option Explicit On | ||
|
||
Namespace SQL | ||
|
||
Public Class SQLDropView | ||
Inherits SQLStatement | ||
|
||
Private pstrName As String | ||
|
||
Public Sub New(ByVal strViewName As String) | ||
|
||
If String.IsNullOrEmpty(strViewName) Then | ||
Throw New ArgumentNullException() | ||
End If | ||
|
||
pstrName = strViewName | ||
|
||
End Sub | ||
|
||
Public Overrides ReadOnly Property SQL() As String | ||
Get | ||
|
||
Return _ | ||
"DROP VIEW " & _ | ||
SQLConvertIdentifierName(pstrName, Me.ConnectionType) | ||
|
||
End Get | ||
End Property | ||
|
||
End Class | ||
|
||
End Namespace |