Dim tb As Table = CurrentTable
Dim n As String = tb.DataTable.name
Dim cl As Col = tb.cols(tb.ColSel)
Dim y As String = tb.DataTable.ConnectionName
If DataTables(n).dataCols.Contains(cl.Name) Then
\'删除列
Dim cmd As New SQLCommand
cmd.ConnectionName = y
Dim s As String
s = "alter Table " & n & " drop column " & cl.Name
cmd.CommandText = s
cmd.ExecuteNonQuery()
\'重新加载表
DataTables.UnLoad(n)
Dim q As new OuterTableBuilder
q.TableName = n
q.TableCaption = n
q.ConnectionName = y
q.SelectString = "Select * Fro m {" & n & "}"
q.Build
\'绑定表
If Tables.Contains(n) Then
MainTable = Tables(n)
Tables("导航_Table1").DataSource = DataTables(n)
End If
End If