visualbasic
asked on
How do you delete a table in an access table in Vb.net
I am using the following code already ,is the solution along these lines?
Public Function IsTableInExistance(ByVal TableName As String) As Boolean
Try
conn.Open()
Dim schemaTable As DataTable = conn.GetOleDbSchemaTable(O leDbSchema Guid.Table s, _
New Object() {Nothing, Nothing, Nothing, "TABLE"})
TableName = TableName.ToUpper
For Each row As DataRow In schemaTable.Rows
Dim TblName As String = row(2)
If TblName.ToUpper = TableName Then
Return True
End If
Next
Catch Ex As Exception
Throw New System.Exception("An exception has occurred. " & Ex.Message)
Finally
conn.Close()
End Try
End Function
Public Function IsTableInExistance(ByVal TableName As String) As Boolean
Try
conn.Open()
Dim schemaTable As DataTable = conn.GetOleDbSchemaTable(O
New Object() {Nothing, Nothing, Nothing, "TABLE"})
TableName = TableName.ToUpper
For Each row As DataRow In schemaTable.Rows
Dim TblName As String = row(2)
If TblName.ToUpper = TableName Then
Return True
End If
Next
Catch Ex As Exception
Throw New System.Exception("An exception has occurred. " & Ex.Message)
Finally
conn.Close()
End Try
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.