ASP中select * where中条件等值语句

2025-05-17 08:44:13
推荐回答(3个)
回答(1):

调用你的网页的时候,应该添加一个id参数,比如你的网页叫做a.asp,则应该这样在浏览器输入地址:
a.asp?id=xxx

xxx是你数据库里面存在的一条记录的no值

回答(2):

id的数据类型
应该是这句exec="select * from data where no="&id&"" 有问题,改为:
exec="select * from data where no="&id
试下,

回答(3):

补:数据库有no这个字段吗?
exec="select * from data where no="&id&""
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if not rs.eof then
把代码放在这里
end if