请帮忙纠正错误。高分请教!!!!!

tanmaomao999 2002-12-01 07:11:37
Dim ObjTestLineConfig
Set ObjTestLineConfig = CreateObject("Scripting.Dictionary")
strSql="select * from TLView_TestLineConfig"
Set objRs = objConn.Execute(strSql)
DO While not objRs.eof
strcode = objRs("ccCode")
strname = objRs("ccCodeName")
ObjTestLineConfig.Add strcode,strname
objRs.movenext
Loop
objRs.Close
Application("ObjTestLineConfig") = ObjTestLineConfig
提示最后一句出错,为什么?如何更正(数据库检索是正确的)
...全文
21 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
softrookie 2002-12-01
  • 打赏
  • 举报
回复
有没有事先定义session("ObjTestLineConfig")
nittystone 2002-12-01
  • 打赏
  • 举报
回复
关注
bushido 2002-12-01
  • 打赏
  • 举报
回复
set session("ObjTestLineConfig") = ObjTestLineConfig
月光易水 2002-12-01
  • 打赏
  • 举报
回复
Set ObjTestLineConfig = CreateObject("Scripting.Dictionary")
.....
set Application("ObjTestLineConfig") = ObjTestLineConfig

错误类型:
应用程序对象, ASP 0197 (0x80004005)
不能添加 apartment 型的对象到应用程序的实质对象中。

Dictionary是一个存储集合,
Application对象不能使用该类型
caoshangfei 2002-12-01
  • 打赏
  • 举报
回复
提示什么错误?
annkie 2002-12-01
  • 打赏
  • 举报
回复
objRs.open strsql,conn,1,1
没有 写
tanmaomao999 2002-12-01
  • 打赏
  • 举报
回复
不行,错误提示是错误类型:
应用程序对象, ASP 0185 (0x8002000E)
找不到对象的默认属性。
nittystone 2002-12-01
  • 打赏
  • 举报
回复
是不是应该这样
set Application("ObjTestLineConfig") = ObjTestLineConfig

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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