lnessuno
15-06-2004, 18:41
<%
username = request.form ("username")
password = request.form ("password")
Set Conn = Server.createobject("ADODB.Connection")
Conn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("forum.mdb")
Conn.Open
Set RS = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * from T_Utenti where Username = " & username
RS.Open SQL, Conn, 2, 1
if not rs.eof then
if rs("Password") = password then
session("User") = rs("Username")
response.write "benvenuto " & session("User")
else
response.write "Nome utente o password non validi. <a href=""login.asp"">Riprova</a>"
session.abandon
end if
end if
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
non capisco, sembrerebbe tutto a posto però mi da questo errore:
Microsoft OLE DB Provider for ODBC Drivers errore "80040e10"
[Microsoft][Driver ODBC Microsoft Access] Parametri insufficienti. Previsto 1.
/autentica.asp, riga 11
any idea?
username = request.form ("username")
password = request.form ("password")
Set Conn = Server.createobject("ADODB.Connection")
Conn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("forum.mdb")
Conn.Open
Set RS = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * from T_Utenti where Username = " & username
RS.Open SQL, Conn, 2, 1
if not rs.eof then
if rs("Password") = password then
session("User") = rs("Username")
response.write "benvenuto " & session("User")
else
response.write "Nome utente o password non validi. <a href=""login.asp"">Riprova</a>"
session.abandon
end if
end if
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
non capisco, sembrerebbe tutto a posto però mi da questo errore:
Microsoft OLE DB Provider for ODBC Drivers errore "80040e10"
[Microsoft][Driver ODBC Microsoft Access] Parametri insufficienti. Previsto 1.
/autentica.asp, riga 11
any idea?