Salve a tutti, il mio problema è questo:
ho scaricato uno script per loggarsi all'interno di alcune pagine protette come admin e lo ho adattato affinchè riconoscesse una password criptata md5 all'interno di un db access.
Il problema però è che mi riconosce solo il primo tra gli utenti presenti nella tabella TB_UTENTI e non i successivi ovvero solo il primo record nonostante che nella query gli abbia specificato SELECT * FROM TB_UTENTI.
Come posso risolvere?
Il codice è il seguente:

<%

Option Explicit

'--- Prevent caching
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "cache-control", "must-revalidate"
Response.AddHeader "cache-control", "private"
Response.AddHeader "pragma", "no-cache"
Session.Timeout = 20
%>


<%
Dim cn
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open strDB
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
Dim strSql
strSQL="SELECT * FROM TB_UTENTI"
rs.Open strSQL,cn

'--- Define variables
Dim sReferer, sGoBackTo, sUserName, sPassword, bLoginSuccessful, Error
Dim UserName, Password

UserName = rs("user")
Password = rs("pass")

if request.querystring("comebackto") <> "" then
sReferer = request.querystring("comebackto")
sGoBackTo = "?" & request.querystring
end if

'--- If Login Form has been submitted
if request.form("Status") = "FormSubmitted" then
sUserName = replace(request.form("txtUserName"),"'","")
sPassword = replace(MD5(request.form("txtPassword")),"'","")

'--- Check for username and password match
If (sUserName = UserName) AND (sPassword = Password) then
bLoginSuccessful = True
Else
bLoginSuccessful = False
Error = "Username o password errati!"
'--- Send user to the default page after 3 unsuccessful try
Session("count") = Session("count") + 1
if Session("count") > 3 then
Session.abandon
response.redirect sGoBackTo
End if
End if
Session("bLoginSuccessful") = bLoginSuccessful
End if

'--- After a successful login, let's send the user back to see the protected page
'--- The variable sReferer holds the page to go back,
'--- if it is empty, the user is redirected to the default page
if bLoginSuccessful Then
if sReferer = "" then
response.redirect "../"
else
response.redirect sReferer
end if
else

'--- If no login performed then display the Login Form
%>

<link rel="stylesheet" type="text/css" href="stile.css">
<table width="743" border="0" align="center" cellpadding="0" cellspacing="10" bgcolor="#000000">
<tr>
<td class="cerca">
<p align=center>
<font size="2" color="#FFD80C">Per entrare nell area di modifica è necessario effettuare il riconoscimento!</font>

</p>
</td>
</tr>
<tr>
<%

'--- Show error when credentials are incorrect
if Error <> "" then
response.write "<td colspan=2 align=center class=cerca bgcolor=#000000><font color=red size=2>" & Error
response.write "</font>

</td></tr><tr>"
End if

%>
<td align="center" height="80" class="cerca">
<form action="login.asp<%=sGoBackTo%>" method="post" name="Login">
<table border="0" cellpadding="2" cellspacing="0" bgcolor="#000000" class="cerca"><tr>
<td align="right"><font color="red">*</font>User name:</td>
<td><input type="Text" name="txtUserName" size="30" class="inputclass"></td>
</tr><tr>
<td align="right"><font color="red">*</font>Password:</td>
<td><input type="Password" name="txtPassword" size="30" class="inputclass"></td>
</tr><tr>
<td colspan="2" height=30 class=cerca align=right>
<input type="submit" name="cmdLogin" value="Login" class="buttonclass">
<input type="hidden" name="Status" value="FormSubmitted">
</td></tr></table>



</p><div align="center">Torna alla Home</div>

</p></form></td></tr>

</table>

<%End if

Rs.close
set Rs = nothing

cn.close
set cn = nothing

%>


Grazie 1000 a chiunque voglia darmi una mano!