Ver Mensaje Individual
  #12 (permalink)  
Antiguo 09/01/2008, 14:39
danyac27
 
Fecha de Ingreso: enero-2008
Mensajes: 5
Antigüedad: 17 años, 4 meses
Puntos: 0
Exclamación Re: Ayuda para actualizar tabla en access con un formulario de region repetida

Ya logre hacer que me actualice, pero solo lo hace con el primer registro, alguna idea de como puedo lograr que me actualice todos???

Saludos



<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/whoiswho_mig.asp" -->

<%
Dim oConn
set oConn=Server.CreateObject("ADODB.Connection")
oConn.Open="Driver=Microsoft Access Driver (*.mdb); DBQ=" & Server.MapPath("database") & "\whoiswho_mig2.mdb;"
'id_data=request.Form("id")
'response.Write(id_data)
'geology=request.Form("geology")
'response.Write(geology)
arreglo = request("id")
arreglo1 = request("geology")

arreglo = split(arreglo,",")
arreglo1 = split(arreglo1,",")

total = ubound(arreglo)
total1 = ubound(arreglo1)

for x=0 to total

for y=0 to total1

set oConn = Server.CreateObject("ADODB.Connection") ' conexion
oConn.Open "Driver=Microsoft Access Driver (*.mdb); DBQ=" & Server.MapPath("database") & "\whoiswho_mig2.mdb;"
SQL="UPDATE data SET g_r="&arreglo1(y)&" where id="&arreglo(x)&";"
set rs= oConn.Execute(SQL)
Set oConn = nothing
response.write sql
response.End()

next
next


%>