在线求助(一个查询问题,好简单的,可是我不会,请大虾指点!)

yygywfypl yygywfypl 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我要进行查询,定义了一个数组
如果数组的数和数据库的ID相同的话则显示ID这条记录的所有内容
dim db,i
i=1
do while i<11
set db=server.createobject("ADODB.Connection")
db.Open"yygy"
dim strsql,rs
'response.write a(i)
strsql="select * from timu where ID=" &a(i)&""
set rs=db.execute(strsql)

%>

<h4> 1、<%=rs("timu")%><p></h4>
<form method="post" action="yygywfypl.asp" name="form">
<h5> A<input type="radio" name="1" value="1"><%=rs("A")%>    
B<input type="radio" name="1" value="2"><%=rs("B")%>    
C<input type="radio" name="1" value="3"><%=rs("C")%>    
D<input type="radio" name="1" value="4"><%=rs("D")%><p></h5>

<%
i=i+1
loop
%>
每次执行的时候就是提示set rs=db.execute(strsql)这行出错
但我怀疑是strsql="select * from timu where ID=" &a(i)&""这行出错了
请大虾指点!
...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
yygywfypl
ASP 28,401 成员 356,940 内容