Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/01/2002, 10:38
URSU
 
Fecha de Ingreso: enero-2002
Mensajes: 55
Antigüedad: 23 años, 4 meses
Puntos: 0
Re: Problemas con Cookies

Este es el asp donde se ejecuta el SP que actualiza la tabla de votaciones, de la forma que lo estoy haciendo siempre me escribe la leyebda usted ya voto y ademas actuliza la tabla de votaciones cosa qeu no tendria que hacer si ya voto
<title>nada</title>
<body bgcolor="#9FA81F">
<%@language="vbscript"%>
<!--#include file="Connection/LogeoLLama.asp" -->

<%

Response.Cookies("key") = ""

id_video = Request.form("id_video")

call VOTA()


%>

<%


Sub VOTA ()



Set Command1 = Server.CreateObject("ADODB.Command")





Command1.CommandText = "inserta_voto"
Command1.Parameters.Append Command1.CreateParameter("@RETURN_VALUE" , 3, 4)
Command1.Parameters.Append Command1.CreateParameter("@id_video", 3, 1,4, id_video)
Command1.CommandType = 4
Command1.CommandTimeout = 0
Command1.Prepared = true
Set voto = Command1.Execute

Response.Cookies("key") = "si"
Response.Cookies("key").Expires = Date

if voto.fields.item("error").value = 1 then
MenError = "Error en consulta de datos..."
else
if Request.Cookies("key") = "si" then
response.write ("usted ya voto")
else
response.redirect("comerciales.asp")
end if
end if
Set voto = Nothing
Set Command1 = Nothing


End Sub