Ver Mensaje Individual
  #6 (permalink)  
Antiguo 27/02/2003, 12:42
cayo
 
Fecha de Ingreso: mayo-2001
Ubicación: SMP-LIMA
Mensajes: 120
Antigüedad: 24 años
Puntos: 0
aqui te mando algo que hace lo qeu quieres pero no recuerdo mucho

ANALIZALO QUE NO RECUERDO BIEN LA LOGICA HACE TIEMPO LO HICE CON UN AMIGO, HABER SI ALGUIEN MAS AYUDA, EN ESTA PARTE GRABO UNA SELECCION PARECIDA CUANDO SALE LA RELACION DE EMAILS QUE TIENES Y HACES CHECK EN CADA UNO PARA BORRARLOS, EN ESTE CASO SE SELECCIONA PARA GRABAR LOS COMPONENTES DE CADA COMPUTADORA.
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY background="images/fondo.gif" topmargin="0">
<font color="#0000FF"><b>BIEN</b></font><br>
<%'Response.Write(session("wwbien")) %><br>COMPONENTES ASOCIADOS: <%
dim wsql
dim rs
'Recorre todas las filas del resultado
%>
<%
dim x()
INDICE=0
FOR each dato in Request.Form
INDICE=INDICE+1
REDIM PRESERVE X(INDICE)%>
<%if dato<>"asociar" then %>
<%=dato%>:<%=Request.Form(dato).ITEM %><br>
<% x(indice)=dato
end if %>
<%next
%>
<%
'grabar asociacion
FOR I=1 TO UBound(x)
'Response.Write(x(i)) %><br>
<%sql="insert into detalle_componente values("& x(i) &","& session("wwbien") &")"
Set rs = DBbien.execute(sql)
next

%>
<%
'Actualizar Componente asociado
FOR I=1 TO UBound(x)
sql="update comp_registrados set asociado_si_no='1' where cod_comp="& x(i) &""
Set rs = DBbien.execute(sql)
next
'Set rs = Nothing
'cnn.Close
'Set cnn = Nothing%>
<table width=100% border=0>
<tr>
<td>
<center><h3>Componentes asociados exitosamente<h3></center>
</td>
</tr>
<tr>
<td>CODIGO DE EQUIPO DE COMPUTO ASOCIADO:
</td>
<td> <%=session("wwbien")%>
</td>
</tr>
<tr>
<td><CENTER>COMPONENTES ASOCIADOS CORRECTAMENTE </CENTER>
</td>
<td> <%=session("wwbien")%>
</td>
</tr>
<tr>
<td>
<a href="asociar.asp?wbien=<%=session("wwbien")%>"><i mg border="0" src="images/regresar.gif" WIDTH="100" HEIGHT="30"> </a>
</td>
</tr>
</table>
</BODY>
__________________
Alberto