金茂大厦票价政策:SQL与ASP的查询问题?高手们帮帮忙吧!

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/09 16:59:34
我是一个初学者,在这方面不是很懂!大家帮帮忙吧!
我有一个表态页面为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 = Request.QueryString("index")

set rs=cn.execute("select*from line where 物品.球类='"&index&"'")

dim index
index = Request.QueryString("index")

index='天平架'的单引号去掉

貌似是VB的
不懂 C的我就能帮你