Ver Mensaje Individual
  #9 (permalink)  
Antiguo 05/03/2003, 10:38
Avatar de AlZuwaga
AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 años, 2 meses
Puntos: 535

i = 1
do while not rst.EOF

response.write "<input type='hidden' name='txtID" & i & "' value="&rst("ID_DEL_REGISTRO")&">"
response.write "<td><input type='text' name='txtnum" & i & "' size=1 value="&rst("num")&"></td>"
response.write "<td><input type=text name='txtcodcalle" & i & "' size=5 value="&rst("codcalle")&"></td>"
response.write "<td><input type=text name='txtprov" & i & "' size=23 value="&rst("prov")&"></td>"

i = i + 1
rst.movenext
loop

' y acá agregaría un input oculto para simplificar luego
' el procedimiento al hacer el update en la otra página:

response.write "<input type='hidden' name='cantidad' value="& i &">





luego, en la página que hace el update...


Registros = Request.Form("cantidad") 'ya sabés cuantos son

For i = 1 to Registros

ID = Request.Form("txtID" & i)
Dom = Request.Form("txtnum" & i)
Codcalle = Request.Form("txtcodcalle" & i)
Prov = Request.Form("txtprov" & i)

SQL = "UPDATE Tabla SET Dom = '"&Dom&"', Codcalle = '"&Codcalle&"', Prov = '"&Prov&"' WHERE ID_DEL_RTEGISTRO = " & ID
Next