Tema: Menu en asp
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/01/2006, 16:20
Avatar de JuanRAPerez
JuanRAPerez
Colaborador
 
Fecha de Ingreso: octubre-2003
Mensajes: 2.393
Antigüedad: 21 años, 6 meses
Puntos: 27
yo hice este para alguien de aqui en el foro, estuve buscando el post pero no lo encontre


Cita:
<html>

<head>
<meta http-equiv="Content-Language" content="es">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<%
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("basemenu.mdb"))
%>

<table border="0" width="200" id="table1">
<%
SQL = "SELECT * FROM tablamenu01 order by nombre ASC"
Set objRS = oConn.Execute(SQL)

if objRS.bof and objRS.eof then
Response.write "Estamos dando mantenimiento al menú"
else
%>
<%
while (not objRS.Eof)
cod_menu01 = objRS("cod_menu01")
%>
<tr>
<td width="15" valign="top"><b>*</b></td>
<td valign="top">
<%=objRS("nombre")%>
<%
SQL2 = "SELECT * FROM tablamenu02 where cod_menu01 = '" & cod_menu01 & "' order by nombre ASC"
Set objRS2 = oConn.Execute(SQL2)

if objRS2.bof and objRS2.eof then
'no hacemos nada
else
%>
<table border="0" id="table1">
<%
while (not objRS2.Eof)
cod_menu02 = objRS2("cod_menu02")
%>
<tr>
<td width="15" valign="top"><b>**</b></td>
<td valign="top">
<%=objRS2("nombre")%>
<%
SQL3 = "SELECT * FROM tablamenu03 where cod_menu02 = '" & cod_menu02 & "' order by nombre ASC"
Set objRS3 = oConn.Execute(SQL3)

if objRS2.bof and objRS2.eof then
'no hacemos nada
else
%>
<table border="0" id="table1">
<%
while (not objRS3.Eof)
%>
<tr>
<td width="10" valign="top"><b>***</b></td>
<td valign="top"><%=objRS3("nombre")%></td>
</tr>
<%
objRS3.MoveNext
wend
%>
<%
end if
objRS3.Close
set objRS3 = nothing
%>
</table>
</td>
</tr>
<%
objRS2.MoveNext
wend
%>
<%
end if
objRS2.Close
set objRS2 = nothing
%>
</table>
</td>
</tr>
<%
objRS.MoveNext
wend
%>
<%
end if
objRS.Close
set objRS = nothing
oConn.Close
set oConn = nothing
%>
</table>

</body>

</html>
__________________
JuanRa Pérez
San Salvador, El Salvador