<%
Response.Buffer = True
userid = Session("userid")
Set Con=Server.CreateObject("adodb.connection")
Con.Open "mindsn","user","pw"
Set Rst=Con.Execute("sp_validateuser " & userid)
If Rst.Eof Then
Rst.Close
Set Con=Nothing
Response.Redirect "noaccess.asp"
End If
' programmet fortsätter, användaren finns
%>