agrega un nuevo boton y en el agrega este codigo, eliminandolo del anterior
Código vb:
Ver originalDIM CADENA AS STRING = Convert.ToString(lb1.SELECTEDITEM)
Dim sql2 As String =
"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME =' & CADENA & ' GROUP BY COLUMN_NAME"
Dim dr2 As New SqlCommand(sql2, conn)
reader = dr2.ExecuteReader()
While reader.Read()
values2.Add(reader.Item("COLUMN_NAME").ToString())
End While
lb1.DataSource = values
lb1.DataBind()
lb2.DataSource = values2
lb2.DataBind()
reader.Close()
conn.Close()
y has la prueba con una sola tabla seleccionada y veamos que pasa