Dim Rp As Response
Dim Rq As Request
Dim Ap As Application
Dim Sr As Server
Dim Sn As Session
Public Sub OnStartPage(mysc As ScriptingContext) 'ScriptingContent ' ObjectContext
Set Rp = mysc.Response
Set Rq = mysc.Request
Set Sr = mysc.Server
Set Ap = mysc.Application
Set Sn = mysc.Session
End Sub
Public Sub OnEndPage()
Set Rp = Nothing
Set Rq = Nothing
Set Sr = Nothing
Set Ap = Nothing
Set Sn = Nothing
End Sub
Dim conn,rs,connstr
connstr="Provider=Microsoft.JET.OLEDB.4.0;Data Source=" & Sr.MapPath("data.mdb")
Set Conn = Sr.CreateObject("Adodb.Connection")
conn.open connstr
Set Rs = Sr.CreateObject("Adodb.RecordSet")
Dim sql
sql="select * from [user] where name='" & Rq("name") & "'"
rs.open sql,conn,1,1
If rs.eof then
rp.write("找不到该用户")
End If
set rs=nothing
set conn=nothing
rp.redirect "main.asp"
[此贴子已经被作者于2006-1-9 20:28:59编辑过]