Tengo este código, je, :) ya se que es el mismo código que he puesto en el anterior post, pero se estaba liando demasiado el anterior post...
Código:
'con esto gracias a dazuaga y urjose, se consigue esta línea SELECT * FROM tblPolls WHERE id_no = 203 or id_no = 207 or id_no = 253
queIDStr = trim(request.form("id_no"))
queIDStr = Split(queIDStr, ",")
strSQL = "SELECT * FROM tblPolls WHERE "
For i = 0 To UBound(queIDStr)
If i <> UBound(queIDStr) then
strSQL = strSQL & " id_no = " & queIDStr(i) & " or "
Else
strSQL = strSQL & " id_no = " & queIDStr(i)
End if
Next
'Set the cursor type property of the recordset to Dynamic so we can navigate through the record set
rsSavePollVotes.CursorType = 2
'Set the Lock Type for the records so that the recordset is only locked when it is updated
rsSavePollVotes.LockType = 3
'Query the database
rsSavePollVotes.Open strSQL, strCon
'aquí prueba que la consulta la haga bien
response.write strSQL
'Esta parte es na que se tiene que repetir para que me guarde los valores de los id 203,207,253
textolibre = Request.Form("textolibre")
rsSavePollVotes("textolibre") = textolibre
'Read in the value of the vote choice selected form the database
intVoteChoiceCount = CInt(rsSavePollVotes(strPollVoteChoice))
'incrementa el valor del voto en 1
intVoteChoiceCount = intVoteChoiceCount + 1
'Esto me recoge el valor del campo PollVotes, por ejemplo si he votado en Votes_1, pues me pone un 1 en la votación, si alguien ya ha votado me suma 1 a la cantidad que haya en la BD, esta variable viene de <input type=" & result("campoT") & " name=""PollVote" & id_no &" value=""Votes_" & intSelectionLoopCounter & """>
rsSavePollVotes.Fields(strPollVote) = CInt(intVoteChoiceCount)
rsSavePollVotes.Update
'Re-run the query to read in the updated recordset from the database for the poll results
rsSavePollVotes.Requery
Bueno vale ya no les aburro más.
Un saludo