Skip to content

Commit

Permalink
Corrected SQLViewExists for MySQL. Closes #59.
Browse files Browse the repository at this point in the history
  • Loading branch information
hisystems committed May 5, 2012
1 parent 85bc7fb commit 1168675
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion SQL/Views/SQLViewExists.vb
Expand Up @@ -42,7 +42,14 @@ Namespace SQL
Case Database.ConnectionType.MicrosoftAccess
Throw New NotSupportedException
Case Database.ConnectionType.MySQL
strSQL = "SHOW VIEWS LIKE " & SQLConvertValue(pstrViewName, Me.ConnectionType)
objSelect = New SQLSelect
With objSelect
.ConnectionType = Me.ConnectionType
.Tables.Add("Tables").SchemaName = "INFORMATION_SCHEMA"
.Where.Add("Table_Type", ComparisonOperator.EqualTo, "View")
.Where.Add("TABLE_NAME", ComparisonOperator.Like, pstrViewName)
strSQL = .SQL
End With
Case Database.ConnectionType.SQLServer
objSelect = New SQLSelect
With objSelect
Expand Down

0 comments on commit 1168675

Please sign in to comment.