Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/04/2006, 08:58
Avatar de pinchoso
pinchoso
 
Fecha de Ingreso: octubre-2005
Ubicación: Barcelona
Mensajes: 177
Antigüedad: 19 años, 6 meses
Puntos: 0
El problema que tienes es que estas recogiendo siempre el mismo valor que te viene del formulario.
Prueba haciendo algo así:

Código:
<% 
w_total_reg = 0
do while not Rs.eof
w_total_reg = w_total_reg + 1 
%>
<tr bgcolor="#CCCCCC"> 
<td> <div align="center"><font size="-3" face="verdana">&nbsp; 
<input name="codigo_actividad<%=w_total_reg%>" type="text" id="codigo_actividad<%=w_total_reg%>" value="<%= RS("codigo_actividad") %>" size="5" readonly="true">
</font></div></td>
<td><font size="1">&nbsp;<%= RS ("actividad_actividad") %></font></td>
<td> <div align="center"> <font size="1"> 
<input name="cantidad_gestion<%=w_total_reg%>" type="text" id="cantidad_gestion<%=w_total_reg%>" value="" size="10">
</font></div></td>
<td> <div align="center"> 
<input name="monto_gestion<%=w_total_reg%>" type="text" id="monto_gestion<%=w_total_reg%>" value="" size="15">
</div></td>
<%
Rs.movenext
loop
' Rs.close
' con.close
rs.movefirst
end if
%>
</tr>
</table>
<p align="center"> 
<input type="submit" name="Submit" value="Guardar">
<% 
Select Case request("submit") 
Case "Guardar" 
fecha=Now()
dia = Day(fecha)
mes = Month(fecha)
anno = Year(fecha)
hora = Hour(fecha)
min = Minute(fecha)
seg = Second(fecha)
fecha =anno & Right(Cstr(mes + 100),2) & Right(Cstr(dia + 100),2)& Right(Cstr(hora + 100),2) & Right(Cstr(min + 100),2) & Right(Cstr(seg + 100),2)
'codigo=request("codigo_actividad")
'do while rs.eof 
for i=1 to w_total_reg
cantidad_gestion= request ("cantidad_gestion")&i
monto_gestion= request ("monto_gestion")&i
oConn.Execute "INSERT INTO sistemges_gestion (codigo_actividad_gestion, cantidad_gestion, monto_gestion, codigo_area_gestion, fecha_gestion) VALUES ("&rs("codigo_actividad")&",'"&cantidad_gestion&"' , '"&monto_gestion&"', '"&codigo_area&"', '"&fecha&"')"
rs.movenext
next

%>
Suerte!
__________________