questo era in access e stramegafunzionava, a questo punto tu dirai e lascialo in access... ebbravo vallo dire al capo vallo a dire...

<%@ Language=VBScript %>
<% option explicit %>
<%Response.Buffer=true%>
<%
Dim user
Dim password
Dim pagina
user = Replace(Request.Form("user"), "'", "''")
password = Replace(Request.Form("password"), "'", "''")
Dim cn
Dim autenticato
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath("utenti.mdb")
Dim sql
sql = "SELECT ID FROM Utenti WHERE user='" &user&_
"' AND PASSWORD='" &password& "'"
Dim rs
Set rs = cn.Execute(sql)


if rs.eof then
autenticato = false
else
autenticato = true
end if

if autenticato = true then
Session("Autenticato") = "OK"
server.transfer("portale.asp")
else
Response.Redirect("negative.asp")
end if
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing

%>