''' 要搜尋的資料表名稱Public Function IsSQLTableExist(ByVal TableName As String) As Boolean
Try
Using con_SQL = GetSQLConnection()
con_SQL.Open()
Dim DT As DataTable
Dim restrictions() As String = {Nothing, Nothing, TableName, Nothing}
DT = con_SQL.getschema("Tables", restrictions)
If DT.Rows.Count > 0 Then
Return True
Else
Return False
End If
End Using
Catch ex As Exception
MsgBox(ex)
End Try
End Function
沒有留言:
張貼留言