Gente:
Tengo una tabla que se carga con datos de una BD, donde uno de los campos es
tipo bit(Checkbox en la tabla). Hasta aqui todo bien, el tema es que necesito volver a guardar los datos de dicha tabla a la BD
(solamente los que cambio el estado del Checkbox) y el
problema esta en COMO identificar a cada fila de la tabla para poder preguntar el estado del CheckBox y hacer el update.
Esta es la tabla donde aparecen los registros:
Código:
<table border="1" width="100%" bordercolor="#CCCC99" cellspacing="3" class="fuente">
<tr bgcolor="#A4A47A">
<th height="35" width="21"><a href="#" onClick="recargar('Devuelto');" style="color: #000000"><font
face="System">Devuelto</font></a></th>
<th height="35" width="90"><a href="#" onClick="recargar('Fecha');" style="color: #000000"><font
face="System">Fecha</font></a></th>
<th height="35" width="90"><a href="#" onClick="recargar('Titulo');" style="color: #000000"><font
face="System">Titulo</font></a></th>
<th height="35" width="92"><a href="#" onClick="recargar('Autor');" style="color: #000000"><font
face="System">Autor</font></a></th>
<th height="35" width="120"><a href="#" onClick="recargar('Editorial');" style="color: #000000"><font
face="System">Editorial</font></a></th>
<th height="35" width="95"><a href="#" onClick="recargar('ID');" style="color: #000000"><font
face="System">ID</font></a></th>
</tr>
<%
While(NOT objRS.EOF)
if(COLOR = "#FFFFFF")Then
COLOR= "#EAEAEA" 'GRIS
else
COLOR= "#FFFFFF" 'BLANCO
End If
Select Case objRS("MES")
Case "1" MES= "Ene"
Case "2" MES= "Feb"
Case "3" MES= "Mar"
Case "4" MES= "Abr"
Case "5" MES= "May"
Case "6" MES= "Jun"
Case "7" MES= "Jul"
Case "8" MES= "Ago"
Case "9" MES= "Sep"
Case "10" MES= "Oct"
Case "11" MES= "Nov"
Case "12" MES= "Dic"
End Select
DIA= Cstr(objRS("DIA"))
HORA= Cstr(objRS("HORA"))
%>
<tr bgcolor=<%= COLOR%> bordercolor=#A4A47A>
<td height="25" width="21"><p align="center"><input type="checkbox" name="Devuelto" value="<%=
objRS("devuelto")%>"></p></td>
<td height="25" width="90"><font face="Verdana" size="1"> <%= MES&","&DIA&" - "&HORA%></font></td>
<td height="25" width="92"><font face="Verdana" size="1"> <%= objRS("titulo")%> </font></td>
<td height="25" width="120"><font face="Verdana" size="1"> <%= objRS("autor")%> </font></td>
<td height="25" width="95"><font face="Verdana" size="1"> <%= objRS("editorial")%></font></td>
<td height="25" width="150"><font face="Verdana" size="1"><%= objRS("id")%> </font></td>
</tr>
<%
objRS.MoveNext
Wend
objRS.Close
oConn.Close
set objRS = nothing
set oConn = nothing
%>
</table>
Desde ya agradezco de antemano a quien pueda aportar algo,
Saludos.