Secondo me stai sbagliando approccio al problema:
1) Al momento in cui registri l'utente, in un campo del tuo db che chiamerai "attivazione" fai scrivere un codice alfanumerico che inserisci nel link di conferma, tipo:
codice:
http://www.tuapaginaweb/attivazione.asp?ID=F343D4E2DB217DC418ED
2) Al momento in cui l'utente clicca sul link che riceve via email, ecco che richiama la pagina attivazione.asp:
codice:
<%
Set adoCon = Server.CreateObject("ADODB.Connection")
OpenStr = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("/mdb/database.mdb")
adoCon.open OpenStr
Set rsCommon = Server.CreateObject("ADODB.Recordset")
blnActivated = false
strAttivazione = Trim(Mid(Request.QueryString("ID"), 1, 22))
strSQL = "SELECT * FROM tbl_iscritti WHERE Attivazione = '" & strAttivazione & "' "
adoCon.execute(strSQL)
If NOT strAttivazione = "" Then
strSQL = "UPDATE tbl_iscritti SET Utente_attivo=True WHERE Attivazione = '" & strAttivazione & "' "
adoCon.execute(strSQL)
sSQL = "SELECT * FROM tbl_iscritti WHERE Attivazione = '" & strAttivazione & "' "
Set rsCommon = Server.CreateObject("ADODB.Recordset")
rsCommon.Open sSQL, OpenStr, 3, 3
blnActivated = true
'CODICE CDOSYS PER INVIO EMAIL
.....
rsCommon.Close
Set rsCommon = Nothing
adoCon.Close
Set adoCon = Nothing
end if
%>