一个简单的循环写法,但我不懂的写。

myveremy 2005-08-11 09:07:44
sqlcmd="select * from table1 where program='all'"
set query1=conn.execute(sqlcmd)
if query1.eof=false then
‘循环把值给输出来 /////////不懂的写啊!
else
response.write "have no value"
...全文
106 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
chang1216 2005-08-11
  • 打赏
  • 举报
回复
不好意思 少写了

query1.movenext
chang1216 2005-08-11
  • 打赏
  • 举报
回复
while not query1.eof
******

wend
asp_m 2005-08-11
  • 打赏
  • 举报
回复
方法一:
if not (query1.eof or query1.bof) then
for i=1 to query1.recordcount
…………
query1.movenext
if query1.eof then
exit for
end if
next
end if

方法二:
while not query1.eof
…………
query1.movenext
wend

==========================================================
北京天气降低了,接点分暖暖
haver.G 2005-08-11
  • 打赏
  • 举报
回复
for i = 1 to query1.recordcount
response.write "xxxxx"
query1.movenext
next
yanxunet 2005-08-11
  • 打赏
  • 举报
回复
还不是一样的道理,关键在天判断rs.eof
自己好好想想再提问!
myveremy 2005-08-11
  • 打赏
  • 举报
回复
如果里面用for语句,要怎么写啊!
wxiaol 2005-08-11
  • 打赏
  • 举报
回复
do while not query1.eof
response.write "xxxxx"
query1.movenext
loop
Carignano 2005-08-11
  • 打赏
  • 举报
回复
do until query1.eof
response.write "xxxxx"
query1.movenext

28,391

社区成员

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

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