Ok, pues hice los cambios que me dijiste y me quedo así:
Código ASP:
Ver original<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQLClient" %>
<script language="vbscript" runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
Dim reader As SqlDataReader
Dim values As ArrayList = New ArrayList()
Dim values2 As ArrayList = New ArrayList()
Dim conn As SqlConnection =
New SqlConnection("server=10.11.2.49;database=extractor;User ID=sa;Password=administrador;Trusted_Connection=no")
Dim sql As String =
"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS GROUP BY TABLE_NAME"
Dim dr As New SqlCommand(sql, conn)
reader = dr.ExecuteReader()
While reader.Read()
values.Add(reader.Item("TABLE_NAME").ToString())
End While
reader.Close()
DIM CADENA AS STRING = values.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()
End Sub
</script>
<html>
<head>
<title>Tablas y Columnas</title>
</head>
<body>
<asp:Label ID="Label1" runat="server" Text="RPE del Empleado"></asp:Label>
<form id="Form1" method="post" runat="server" name="ListEnlaza">
<asp:ListBox id="lb1" SelectionMode="Multiple" runat="server" Height="643px"
Width="196px"/>
<asp:ListBox id="lb2" SelectionMode="Multiple" runat="server" Height="643px"
Width="196px"/>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</form>
</body>
</html>
Y me sigue arrojando un error, ahora en la declaración de la variable cadena:
Mensaje de error del compilador: BC30456: 'SELECTEDITEM' no es un miembro de 'System.Collections.ArrayList'.
Disculpa la tardanza
rikakashi, espero y me puedan ayudar...