con tu permiso
set oConn=Server.CreateObject("ADODB.Connection")
oConn.Open "xxxxxxxx"
SQL="SELECT Id, Login, Password, URL FROM " & _
"xxx.prueba WHERE (Login='"&nombre&"' AND Password='"&password&"');"
set rs=oConn.Execute(SQL)
if rs.EOF then
Session("ID")=Cint(0)
Response.Redirect("error.asp")
else
Session("ID")=CInt(rs.Fields("Id"))
pagina = RS.fields("URL").value
Response.Redirect(pagina)"
end if
creo que asi deberia funcionar compañero