natalie什么意思:SQL与ASP的查询问题?高手们帮帮忙吧!

来源:百度文库 编辑:高校问答 时间:2024/04/29 01:14:40
我是一个初学者,在这方面不是很懂!大家帮帮忙吧!
我有一个表态页面为1.htm
代码如下:
<body>
<a href="100.asp?index=天平架">天平架</a>
<a href="100.asp?index=恒福路">恒福路</a>
<a href="100.asp?index=机场路">机场路</a>
</body>
还有一个100.asp的动态页面
代码如下:
<body><%
dim index = Request.QueryString("index")
%>
<%
set cn=server.createobject("adodb.connection")
cn.provider="sqloledb"
provider="server=3C8CE4E446DA42E;database=运动系统;uid=sa;pwd=123456;"
cn.open provider
set rs=cn.execute("select*from line where 物品.球类='"&index&"'")
response.write"<center><table border=1>"
response.write"<tr bgcolor=#dd8888>"
for i=0 to rs.fields.count -1
response.write"<td>"&rs.fields(i).name &"</td>"
next
response.write"</tr>"
while not rs.eof
response.write"</tr>"
for i=0 to rs.fields.count -1
response.write"<td>"&rs.fields(i).value&"</td>"
next
response.write"</tr>"
rs.movenext
wend
response.write"</table></center>"
rs.close
cn.close
%>
</body>
在100.asp中有问题,我不知道index这个变量怎么传递,也不知道在查询中怎么使用!大家帮帮忙吧!
我的目标就是能在1.htm中点击不同的连接通过100.asp能查询到不同的结果!帮帮忙吧!
这样输入之后仍提示:
语句未结束
/index/100.asp, line 10, column 10
dim index = Request.QueryString("index")

<%
dim index
index = Request.QueryString("index")
%>

群:14866569