请教,这样封装为什么还报错?
有哪里不对吗?封装后注册。访问报错。
Public id
Public Rs
Public Sql
Public conn
Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Server
Set MySession = MyScriptingContext.Session
End Sub
Public Sub OnEndPage()
Set Application = Nothing
Set Request = Nothing
Set Response = Nothing
Set Server = Nothing
Set Session = Nothing
Set Context = Nothing
End Sub
Public Sub fhlad()
id = MyRequest.QueryString("id")
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql = "select * from guangao where oks=1 order by id desc"
Rs.open Sql, conn, 1, 1
If Not Rs.EOF Then
MyResponse.Redirect Rs("ggURL")
End If
Rs.Close
Set Rs = Nothing
conn.Close
Set conn = Nothing
End Sub
Public id
Public Rs
Public Sql
Public conn
Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Server
Set MySession = MyScriptingContext.Session
End Sub
Public Sub OnEndPage()
Set Application = Nothing
Set Request = Nothing
Set Response = Nothing
Set Server = Nothing
Set Session = Nothing
Set Context = Nothing
End Sub
Public Sub fhlad()
id = MyRequest.QueryString("id")
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql = "select * from guangao where oks=1 order by id desc"
Rs.open Sql, conn, 1, 1
If Not Rs.EOF Then
MyResponse.Redirect Rs("ggURL")
End If
Rs.Close
Set Rs = Nothing
conn.Close
Set conn = Nothing
End Sub
...全文
相关推荐
java中封装的实现方法详解
封装可以被认为是一个保护屏障,防止该类的代码和数据被外部类定义的代码随机访问。为什么要进行封装?
MATLAB封装后importdata函数报错
"MATLAB 封装后 importdata 函数报错解决方法"MATLAB 作为一款功能强大且广泛应用于数据分析、科学计算和可视化的编程语言,对于数据的读取和处理具有很强的支持。
Vue中axios的封装(报错、鉴权、跳转、拦截、提示)
"Vue项目中,使用axios进行封装可以实现一系列功能,如错误处理、提示信息、重定向、鉴权和表单序列化。通过axios的拦截器机制,可以统一处理接口报错,并利用Element UI的Message
rt7lite制作Win7母盘精简到到封装及封装报错常见问题解决
rt7lite制作Win7母盘精简到到封装及封装报错常见问题解决,像过度精简、二次封装的问题解决方案
rt7lite制作Win7母盘精简到到封装及封装报错常见问题解
rt7lite制作Win7母盘精简到到封装及封装报错常见问题解,看完必会定制系统,封装系统,附带DLL修复文件


