如下引用字段值为什么不对???在线等待

asp3 2003-11-29 11:31:00
正确的代码如下:
if vardm<>"" then
Recordset1.Source = "SELECT dmmc FROM g_dmqqq where zaldm='QQGDDY' and dm='"&vardm&"'"
Recordset1.Open()
if not Recordset1.eof and not Recordset1.bof then
vardm=Recordset1("dmmc")
end if
Recordset1.close()
end if
而下面却不对为什么?

dim varbyqs
varbyqs=0
Recordset1.Source = "SELECT count(byqjbh) as byqs FROM test where hh='"&varhh&"'"
Recordset1.Open()
if not Recordset1.eof and not Recordset1.bof then
varbyqs=Recordset1("byqs")
end if
Recordset1.close()


这个varbyqs始终没有值,而实际在SQL下运行是有值的
...全文
72 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
asp3 2003-11-29
  • 打赏
  • 举报
回复
怎么没人会帮我啊《!!!!!!!
asp3 2003-11-29
  • 打赏
  • 举报
回复
查询有结果,有个数字2
Jaron 2003-11-29
  • 打赏
  • 举报
回复
response.write "SELECT count(byqjbh) as byqs FROM test where hh='"&varhh&"'"
然后在查询分析器下运行,看有无结果。

28,405

社区成员

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

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