Hola,
De antemano muchas gracias por sus respuestas.
Disculpa mi ignorancia pero es que no entiendo muy bien tu codigo, yo programo de otra forma, entonces se me hace enredado acomodar lo mio a lo tuyo.
Te envio la forma como hago la consulta, para ver que puedo hacer.
Yo intenté llevarle un valor diferente al radio (el valor de i en el for) pero no me funciona.
Muchas gracias por toda su ayuda
Código HTML:
<%'CONSULTA SQL
fechaA= Session ("S_FechaReport1")
fechaB = Session ("S_FechaReport2")
Dim Bombeo, toneles,tabla(5,100)
Set Bombeo= Server.CreateObject("ADODB.Recordset")
Bombeo.ActiveConnection = MM_ElabCavas_STRING
Bombeo.Source = "SELECT fecha1, cava, cuba, marca FROM dbo.bombeo WHERE fecha1 BETWEEN " + fechaA+ "AND" + fechaB+ " ORDER BY fecha1"
Bombeo.CursorType = 0
Bombeo.CursorLocation = 2
Bombeo.LockType = 1
Bombeo.Open()
if (not Bombeo.eof) then
i=0
Bombeo.movefirst()
Do while Not Bombeo.eof
varbom = Bombeo.fields.item("fecha1").value
varcava = Bombeo.fields.item("cava").value
varcuba = Bombeo.fields.item("cuba").value
marca = Bombeo.fields.item("marca").value
fechabom = "'" & Replace(varbom, "'", "''") & "'"
cava = "'" & Replace(varcava, "'", "''") & "'"
cuba = "'" & Replace(varcuba, "'", "''") & "'"
Set toneles= Server.CreateObject("ADODB.Recordset")
toneles.ActiveConnection = MM_ElabCavas_STRING
toneles.Source = "SELECT fechabombeo, cava, cuba, producto FROM dbo.FinllenadoToneles WHERE fechabombeo = "+fechabom +" AND cava = "+cava+" AND cuba = "+cuba+" ORDER BY fechabombeo"
toneles.CursorType = 0
toneles.CursorLocation = 2
toneles.LockType = 1
toneles.Open()
if (toneles.eof) then
tabla(0,i) = varbom
tabla(1,i) = varcava
tabla(2,i) = varcuba
tabla(3,i) = marca
i = i+1
end if
toneles.Close()
Set toneles= Nothing
Bombeo.movenext()
loop
final = i-1
end if
Bombeo.Close()
Set Bombeo= Nothing%>
<table style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 8pt; font-family: verdana; width: 620px; height: 34px;" bordercolor="#009933" cellspacing="2" cellpadding="4" align="center" border="1">
<tr>
<td nowrap="nowrap" align="center" height="31" style="width: 298px"><p align="center"><strong><font color="#009933">
<span class="style4">FECHA Y HORA DE INICIO DEL BOMBEO </span></font></p></td>
<td align="center" height="31" style="width: 124px"><strong><span class="style2"><span class="style3"><span class="style5">CAVA</span></span></span>
</td>
<td align="center" height="31" style="width: 130px"> <strong><span class="style2"><span class="style7">CUBA</span></span></td>
<td align="center" height="31" style="width: 210px"> <strong><span class="style2"><span class="style7">PRODUCTO</span></span></td>
</tr>
<%for i = 0 to final%>
<tr>
<td style="width: 298px; height: 30px;" class="style14" ><strong><span class="style4">
<input name="escoge" type="radio" value="1" checked="checked"></span></strong><span class="style13"><%Response.write " "%><%Response.write tabla(0,i)%></span></td>
<td align="center" style="width: 124px; height: 30px;" class="style9" ><span class="style12"></span><span class="style13"><%Response.write " "%><%Response.write tabla(1,i)%></span></td>
<td align="center" style="width: 130px; height: 30px;" class="style8" ><span class="style2"><span class="style10"><span class="style12"></span><%Response.write " "%><%Response.write tabla(2,i)%></span></span></td>
<td align="center" style="width: 210px; height: 30px;" class="style11" ><%Response.write tabla(3,i)%></span></span></td>
</tr>
<%tabla (4,i) = i
next%>
'---BUSCO CUAL DE LOS RADIOS HECHOS, FUE EL QUE ESCOGIO EL USUARIO
for i = 0 to final
if request.form("escoge") = 1 then
fechabom1 = tabla(0,i)
cava1 = tabla(1,i)
cuba1 = tabla(2,i)
producto1 = tabla(3,i)
i=final
response.write bu
end if
next