程序报如下错,为什么

lngjw 2000-10-28 07:08:00
sqlselect="select * from c"
result1.Open sqlselect,connection,3,3
sqlselect="select * from c1"
result.Open sqlselect,Connection,3,3
p=result.Fields(result1.Fields("name"))
response.write p
报错:ADO could not find the object in the collection corresponding to the name or ordinal reference requested by the application
但是c中的name指向的记录确实是c1中的字段名
...全文
63 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
kylewu 2000-10-29
  • 打赏
  • 举报
回复
试一下p=result.Fields(result1("name").Value)
ciml 2000-10-29
  • 打赏
  • 举报
回复
这语句有点意思,你为什么要用p=result.Fields(result1.Fields("name"))呢,难道你不知道c1中相应的字段名吗?为什么不直接写字段名称呢
你那样肯定要错。因为result1.Fields("name")取出来后是具体的值的,比如应该rs("a"),但写成了rs(a),少了双引号。想办法加上双引号。有点意思,想想有没有办法。我看可能不行,我下去想想
Edward 2000-10-28
  • 打赏
  • 举报
回复
用 p=result.Fields(result1.Fields("[name]")) 试试。

28,390

社区成员

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

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