Ver Mensaje Individual
  #17 (permalink)  
Antiguo 12/09/2002, 03:38
haven
 
Fecha de Ingreso: febrero-2002
Ubicación: Navarra
Mensajes: 701
Antigüedad: 23 años, 3 meses
Puntos: 2
Re: recoger un valor en diferentes variables

Tienes razón dazuaga, haber yo creo que el fallo está aquí:
Código:
 		Set rsSavePollVotes = Server.CreateObject("ADODB.Recordset")		
		
		'First we need to read in the present vote number so we can add 1 to it
		'Initalise the strSQL variable with an SQL statement to query the database


queIDStr = trim(request.form("id_no"))
queIDStr = Split(queIDStr, ",")
'queIDarr = 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

		'strSQL = "SELECT * FROM tblPolls WHERE id_no IN ("&trim(queIDStr)&")"

response.write strSQL

		'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


'Do While Not rsSavePollVotes.EOF
'response.write strSQL
			textolibre = Request.Form("textolibre")	
			rsSavePollVotes("textolibre") =  textolibre

		'Read in the value of the vote choice selected form the database	
		intVoteChoiceCount = CInt(rsSavePollVotes(strPollVoteChoice))
		      	
		'Increment the vote choice by 1
		intVoteChoiceCount = intVoteChoiceCount + 1
		 		 
		    
		'Update the database with the new poll results	
		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
		
					
	'rsSavePollVotes.MoveNext
	'Loop
Si le pongo el
Código:
'Do While Not rsSavePollVotes.EOF
activo entonces me graba en la BD 4000 votos.
Un saludo