Il problema sta qui:
codice:
IF not objRS.EOF THEN 

  strEmail = objRS("userMail")
  strUserCode = objRS("id_user")

'Esegui operazione prevista

else

if IsNull(session("tentativi")) then
     session("tentativi") = 1
   else
     session("tentativi") = session("tentativi") + 1
  end if
  
  if session("tentativi") = 3 then
    SQLUpdate = "UPDATE codici set Locked = true where id_user = "&strUserCode
    response.write SQLUpdate:response.end
    cn.Execute(SQLUpdate)
end if
end if
Nel senso che la query di update è prevista nella condizione
codice:
Else
per cui
codice:
strUserCode = objRS("id_user")
non si valorizza... come risolvo? :master: