Ver Mensaje Individual
  #8 (permalink)  
Antiguo 28/06/2004, 10:49
ciberpata
 
Fecha de Ingreso: junio-2003
Ubicación: Santiago de Compostela
Mensajes: 603
Antigüedad: 21 años, 11 meses
Puntos: 0
Creo haber realizado tus modificaciones pero no va.
No va, no consigo ver nada. Y el error que me da es:
"No se puede mostrar la página"
O sea que no tengo ni idea de que rayos es lo q pasa.
Por favor podrías revisar mi código (te lo agradecería muchísimo) para ver que rayos le pasa.

Código remodelado
------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
response.Expires=0
Response.AddHeader "PRAGMA", "NO-CACHE"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Documento sin t&iacute;tulo</title>
</head>
<!--Incluimos el fichero de constantes-->
<!--#INCLUDE file="ADOVBS.asp"-->

<%
comboarticulo=request("comboarticulo")
response.write("El valor del combo es: " & comboarticulo)
%>

<%'Conectamos a la base de datos
set Conn= Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "DSN=clubviajesoferta.com.amancio"
Conn.open
Set RS=Server.CreateObject("ADODB.Recordset")
RS.activeconnection=Conn
RS.source="articulostalla"
RS.Locktype = adLockOptimistic
RS.CursorType = adOpenDinamic
RS.open
%>

<%
'Conectamos a la base de datos
Set Command= Server.CreateObject("ADODB.Command")

' Abrimos el Recordset RS2 para realizar la consulta del combotallasexistentes
Command.ActiveConnection=Conn
Command.CommandType=adCmdText
'Si se sustituye la línea siguiente por :
' Command.CommandText= "Select * From tallas"' WHERE id = " & comboarticulo
' verás que no hay ningun error en las tablas
Command.CommandText= "Select * From tallas WHERE id = " & comboarticulo & " ORDER BY talla"
RS2=Command.Execute ()
%>


<body>
<form action="anadir_talla.asp" method="get" name="form1">
<table width="30%" border="0">
<tr valign="top">
<td width="68%">Tallas existentes </td>
<td width="16%"><select name="combotallasexistentes" size="5" id="combotallasexistentes">
<%
if not (rs2.bof and rs2.eof) then
rs2.movefirst
do while not rs2.eof %>
<option value="<%=rs2("talla")%>"><%=rs2("talla")%></option>
<%rs2.movenext
loop
end if
%>
</select></td>
<td width="16%"><input type="submit" value="Consultar tallajes"></td>
</tr>
</table>


<p>&nbsp;</p>
<p>Articulo
<select name="comboarticulo">
<%
if not (rs.bof and rs.eof) then
rs.movefirst
do while not rs.eof %>
<option value="<%=rs("id")%>" selected>
<%if rs("id")=comboarticulo then
response.write("selected")
end if
%>
<%=rs("articulo")%>
</option>
<%
rs.movenext
loop
end if
%>
</select>
</p>
</form>
</body>

<%
rs.close
rs2.close
conn.close
%>
</html>
---------------------------------------
Fin de código


Muchisimas gracias por todo

Última edición por ciberpata; 28/06/2004 a las 11:04 Razón: Código mal escrito