Ver Mensaje Individual
  #6 (permalink)  
Antiguo 21/11/2002, 13:54
luisgls
 
Fecha de Ingreso: noviembre-2002
Mensajes: 133
Antigüedad: 22 años, 6 meses
Puntos: 0
codigo completo

<%
Option Explicit
Dim sql, username, rsIdentifs, seleccion

seleccion = Request.QueryString("seleccion")

%>
<!--#include file="conn.asp"-->
<%
'Seleccion 1
If seleccion = "uno" then
sql = "SELECT 'tabla1' as Listado FROM tabla1 WHERE tabla1.username = 'Juan' UNION SELECT 'tabla2' as Listado FROM tabla2 WHERE tabla2.username = 'Juan'
Set rsIdentifs = Server.CreateObject("ADODB.Recordset")
rsIdentifs.Open sql, conn, 3, 3
End If
%>

<a href="prueba.asp?seleccion=uno">Seleccion primera</a>
<a href="prueba.asp?seleccion=dos">Seleccion segunda</a>


<%if seleccion="uno" then%>

<%If not rsIdentifs.EOF then%>

<%rsIdentifs.Movefirst
do until rsIdentifs.EOF%>
<tr bgcolor="#F3F3F3">
<td><font face="arial,helvetica" size="2"><%=rsIdentifs.Fields("Listado")%></font></td>
</tr>
<%rsUsers.Movenext
loop%>
</font>
</body>
</html>
<%end if%>
<%end if%>