hai costruito male la stringa.

codice:
sql = "SELECT * FROM resactv where email='" & mail & "' and actv='" & attivita & "'"
ho assunto che sia mail che attivita siano stringhe. in caso contrario togli gli apici.