
14/04/2008, 15:45
|
| | Fecha de Ingreso: febrero-2008
Mensajes: 17
Antigüedad: 17 años, 3 meses Puntos: 0 | |
Re: Ayuda con Request.querystring <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
/*----------Text Styles----------*/
.ws6 {font-size: 8px;}
.ws7 {font-size: 9.3px;}
.ws8 {font-size: 11px;}
.ws9 {font-size: 12px;}
.ws10 {font-size: 13px;}
.ws11 {font-size: 15px;}
.ws12 {font-size: 16px;}
.ws14 {font-size: 19px;}
.ws16 {font-size: 21px;}
.ws18 {font-size: 24px;}
.ws20 {font-size: 27px;}
.ws22 {font-size: 29px;}
.ws24 {font-size: 32px;}
.ws26 {font-size: 35px;}
.ws28 {font-size: 37px;}
.ws36 {font-size: 48px;}
.ws48 {font-size: 64px;}
.ws72 {font-size: 96px;}
.wpmd {font-size: 13px;font-family: 'Arial';font-style: normal;font-weight: normal;}
/*----------Para Styles----------*/
DIV,UL,OL /* Left */
{
margin-top: 0px;
margin-bottom: 0px;
}
</style>
<style type="text/css">
a.style1:link{color:#808080;text-decoration: none;}
a.style1:visited{color:#808080;text-decoration: none;}
a.style1:active{color:#808080;text-decoration: none;}
a.style1:hover{color:#003366;text-decoration: none;}
a.style2:link{color:#FF6600;text-decoration: none;}
a.style2:visited{color:#FF6600;text-decoration: none;}
a.style2:active{color:#FF6600;text-decoration: none;}
a.style2:hover{color:#993300;text-decoration: none;}
</style>
<style type="text/css">
div#container
{
position:relative;
width: 779px;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align:left;
}
body {text-align:center;margin:0}
</style>
<title>.::Busquedas::.</title>
<style type="text/css">
<!--
.Estilo1 {font-family: Arial, Helvetica, sans-serif}
.Estilo9 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; }
-->
</style>
</head>
<body background="http://www.forosdelweb.com/images/fondo-oportunidades.gif">
<table width="746" height="34" border="0" align="center" cellspacing="0">
<tr>
<td width="19" background="http://www.forosdelweb.com/images/line_left.jpg" bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF" valign="top"><table width="100%" border="0" cellspacing="0">
<tr>
<td height="34" background="http://www.forosdelweb.com/images/top_line.gif"> </td>
</tr>
<tr>
<td height="34"><object width="706" height="159" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
<param name="movie" value="http://www.forosdelweb.com/images/head.swf" />
<param name="quality" value="high" />
<param name="loop" value="1" />
<param name="wmode" value="window" />
<embed src="http://www.forosdelweb.com/images/head.swf" width="706" height="159" quality="high" type="application/x-shockwave-flash" wmode="window" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object></td>
</tr>
</table>
<table width="100%" height="38" border="0" cellspacing="0">
<tr>
<td background="http://www.forosdelweb.com/images/line_2.jpg"><div align="left"><font color="#008000" class="ws9 Estilo1"><b> NUEVO SUBCOMPONENTE </b></font></div></td>
<td background="http://www.forosdelweb.com/images/line_2.jpg"><div align="center"><a href="p_programa.asp"><font color="#008000" class="ws9 Estilo1"><b>Inicio</b></font></a></div></td>
</tr>
</table>
<form name="f" method="post" action="n_subcomponente.asp">
<table width="54%" border="0" align="center" cellspacing="0">
<tr>
<td bgcolor="#339966"><div align="left"><font color="#FFFFFF" class="ws8 Estilo1">Componente</font></div></td>
</tr>
<tr>
<td bgcolor="#99FFCC">
<div align="left">
<input name="idcomponente" type="text" id="idcomponente" style="width:50px;font-weight:bold;background:#99CCCC" onfocus = "this.blur()" value="<%Response.Write id%>"/>
</div></td>
</tr>
<tr>
<td bgcolor="#339966"><div align="left"><font color="#FFFFFF" class="ws8 Estilo1">Codigo Sub Componente</font></div></td>
</tr>
<tr>
<td bgcolor="#99FFCC">
<div align="left">
<input name="codigo" type="text" id="codigo" style="width:60px" value="<%=(Recordset2.Fields.Item("codigo").Value) %>."/>
</div></td>
</tr>
<tr>
<td bgcolor="#339966"><div align="left"><font color="#FFFFFF" class="ws8 Estilo1">SubComponente</font></div></td>
</tr>
<tr>
<td bgcolor="#99FFCC"><label>
<div align="center">
<textarea name="subcomponente" id="subcomponente" style="width:350px;Height:80px"></textarea>
</div>
</label></td>
</tr>
<tr>
<td bgcolor="#99FFCC"><label>
<div align="center">
<input type="submit" name="Submit" value="Enviar" />
</div>
</label></td>
</tr>
</table>
</form>
<p align="left" class="Estilo9"><font class="ws8">
Registros <%=(Recordset1_first)%> a <%=(Recordset1_last)%> de <%=(Recordset1_total)%></font></p>
<table border="0" align="center" cellspacing="0">
<tr>
<td width="99" bgcolor="#008000"><div align="center" class="Estilo9"><font class="ws8" color="#FFFFFF">Codigo</font></div></td>
<td width="422" bgcolor="#008000"><div align="left"><span class="Estilo9"><font class="ws8" color="#FFFFFF">Sub Componente</font></span></div></td>
<td width="55" bgcolor="#008000"><div align="center"><span class="Estilo9"><font class="ws8" color="#FFFFFF">Borrar</font></span></div></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr bgcolor="#99FFCC">
<td><div align="center"><span class="Estilo9"><font class="ws8"><%=(Recordset1.Fields.Item("codigo").V alue)%></font></span></div></td>
<td bgcolor="#99FFCC"><div align="left"><span class="Estilo9"><font class="ws8"><%=(Recordset1.Fields.Item("subcompone nte").Value)%></font></span></div></td>
<td valign="middle"><center>
<a href="b_subcomponente.asp?id=<%Response.Write Recordset1("idsubcomponente")%>"><img src="http://www.forosdelweb.com/images/013.png" border="0"></a></center></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
<p> </p>
<table width="100%" height="30" border="0" cellspacing="0">
<tr>
<td background="http://www.forosdelweb.com/images/line_4.jpg" valign="baseline"> </td>
</tr>
</table>
<table width="100%" height="72" border="0" cellspacing="0">
<tr>
<td background="http://www.forosdelweb.com/images/bottom_line.jpg" valign="baseline"> </td>
</tr>
</table></td>
<td width="19" background="http://www.forosdelweb.com/images/line_right.jpg" bgcolor="#FFFFFF"> </td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
else
'si que recibo un formulario, entonces lo trato
'recojo los datos
idcomponente=Request.Form("idcomponente")
codigo=Request.Form("codigo")
subcomponente=Request.Form("subcomponente")
'hacemos toda la conexion a la BD.
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=SQLOLEDB;Data Source=ip;database=dataa;uid=userr;pwd=pass;"
'Hago el INSERT, creando un nuevo registro.
oConn.execute "INSERT INTO PFsubcomponente VALUES('"&codigo&"','"&subcomponente&"','"&idcompo nente&"')"
oConn.Close
Set oConn = nothing
Response.Clear
Response.Redirect("n_tarea.asp?id="&id&"")
end if
%>
Me bota un ERROR DE ESTE TIPO:
Tipo de error:
ADODB.Field (0x80020009)
El valor de BOF o EOF es True, o el actual registro se eliminó; la operación solicitada requiere un registro actual.
/fida/programa/n_tarea.asp
EN EL NAVEGADOR APARECE ESTO: http://localhost/fida/programa/n_tarea.asp?id=
como veran no me envia el dato :(
Última edición por turokoscar; 14/04/2008 a las 15:59 |