在线求助(一个查询问题,好简单的,可是我不会,请大虾指点!)
我要进行查询,定义了一个数组
如果数组的数和数据库的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)&""这行出错了
请大虾指点!