Link to home
Start Free TrialLog in
Avatar of visualbasic
visualbasicFlag for Ireland

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(OleDbSchemaGuid.Tables, _
                                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
Avatar of Arundel_Castle
Arundel_Castle

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial