Ver Mensaje Individual
  #11 (permalink)  
Antiguo 28/02/2003, 11:52
Avatar de BatusaiX
BatusaiX
 
Fecha de Ingreso: diciembre-2001
Ubicación: Santo Domingo - Rep. Dom.
Mensajes: 63
Antigüedad: 23 años, 4 meses
Puntos: 0
Eso es lo que tengo hasta ahora pero me esta dando error en la linea del primer Request es decir en la variable "codigo" no en realidad lo que pasa pero no esta introduciendo la informacion...
AYUDA !!!

Formulario de Envio
======================================
<%@ LANGUAGE=VBSCRIPT %>
<% Option Explicit %>
<html>
<head>
<title>Insertar Lista de Bodas</title>
</head>
<body>


<!--#include file="conn.asp"-->
<%
Dim rs, strQuery

Set rs= Server.Createobject("ADODB.Recordset")
rs.CursorType = 1
rs.LockType = 3

strQuery = "SELECT id FROM novios WHERE id = id "
Set rs = Conn.Execute(strQuery)
%>



<form method="POST" action="insertar_listabodaproceso.asp">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="36%" id="AutoNumber3">
<tr>
<td width="100%">

<p align="center"><font face="Tahoma"><b><font size="2">Lista de boda #</font></b><font size="1">
<SELECT NAME="id">
<%
Do While Not rs.EOF

Response.Write "<OPTION VALUE='" & rs("id") & "'>"
Response.Write rs("id")

rs.MoveNext
Loop
%>
</SELECT>
</font></font><font size="1" face="Tahoma"><br>
<br>
&nbsp;</font></td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="349" id="AutoNumber1" height="51">
<tr>
<td width="18" align="center" bordercolor="#000000" bgcolor="#000000" height="19">
<b><font color="#FFFFFF" size="1" face="Tahoma">#</font></b></td>
<td width="56" align="center" bordercolor="#000000" bgcolor="#000000" height="19">
<b><font color="#FFFFFF" size="1" face="Tahoma">Código</font></b></td>
<td width="204" align="center" bordercolor="#000000" bgcolor="#000000" height="19">
<b><font color="#FFFFFF" size="1" face="Tahoma">Producto</font></b></td>
<td width="66" align="center" bordercolor="#000000" bgcolor="#000000" height="19">
<b><font color="#00FF00" size="1" face="Tahoma">$ Precio</font></b></td>
</tr>
<tr>
<td width="18" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma">1.</font></td>
<td width="56" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma"><input type="text" name="codigo1" size="6"></font></td>
<td width="204" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma">
<input type="text" name="producto1" size="28"></font></td>
<td width="66" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font color="#FF0000" size="1" face="Tahoma">
<input type="text" name="precio1" size="6"></font></td>
</tr>
<tr>
<td width="18" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma">2. </font></td>
<td width="56" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma"><input type="text" name="codigo2" size="6"></font></td>
<td width="204" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma">
<input type="text" name="producto2" size="28"></font></td>
<td width="66" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font color="#FF0000" face="Tahoma" size="1">
<input type="text" name="precio2" size="6"></font></td>
</tr>
<tr>
<td width="18" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font face="Tahoma" size="1">3.</font></td>
<td width="56" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma"><input type="text" name="codigo3" size="6"></font></td>
<td width="204" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma">
<input type="text" name="producto3" size="28"></font></td>
<td width="66" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font color="#FF0000" size="1" face="Tahoma">
<input type="text" name="precio3" size="6"></font></td>
</tr>
<tr>
<td width="18" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font face="Tahoma" size="1">4.</font></td>
<td width="56" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma"><input type="text" name="codigo4" size="6"></font></td>
<td width="204" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma">
<input type="text" name="producto4" size="28"></font></td>
<td width="66" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font color="#FF0000" size="1" face="Tahoma">
<input type="text" name="precio4" size="6"></font></td>
</tr>
<tr>
<td width="18" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font face="Tahoma" size="1">5.</font></td>
<td width="56" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma"><input type="text" name="codigo5" size="6"></font></td>
<td width="204" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font size="1" face="Tahoma">
<input type="text" name="producto5" size="28"></font></td>
<td width="66" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" height="31">
<font color="#FF0000" size="1" face="Tahoma">
<input type="text" name="precio5" size="6"></font></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="35%" id="AutoNumber2">
<tr>
<td width="100%">
<p align="center"><br>
<input type="submit" value="Insertar" name="B1">
<input type="reset" value="Borrar" name="B2"></td>
</tr>
</table>
</form>
</body>
===========================================

Pagina de Proceso
===========================================
<%@ LANGUAGE=VBSCRIPT %>
<% Option Explicit %>

<%
Dim codigo(4)
Dim producto(4)
Dim precio(4)
Dim id_tblproductos
Dim i


%>


<!--#include file="conn.asp"-->


<%
Dim rs, SQL
Set rs= Server.Createobject("ADODB.Recordset")
rs.CursorType = 1
rs.LockType = 3

For i = 1 to 5

id_tblproductos = request.form("id")

codigo= request.form("codigo" & i)
producto= request.form("producto" & i)
precio= request.form("precio" & i)

SQL = "INSERT INTO productos (idnovios_tblp ,codigoproducto, producto, precioventa) VALUES ('"&id_tblproductos&"', '"&codigo&"','"&producto&"','"&precio&"')"
rs.open SQL, Conn

Next
%>
==============================================