请教,这样封装为什么还报错?

BENCQS 2011-06-17 11:39:31
有哪里不对吗?封装后注册。访问报错。



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
...全文
101 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ycproc 2011-06-18
  • 打赏
  • 举报
回复
具体那里的错 你调试一下

BENCQS 2011-06-18
  • 打赏
  • 举报
回复
哪不对。谁帮我看一下

4,009

社区成员

发帖
与我相关
我的任务
社区描述
它是一种微软环境下的轻量级的解释型语言,它使用COM组件、WMI、WSH、ADSI访问系统中的元素,对系统进行管理。
社区管理员
  • vbScript社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧