狂野模式怎么解锁:网页上的数据库查询

来源:百度文库 编辑:高校问答 时间:2024/04/29 04:09:39
能将符合条件地项目分别列出,如 age="23" 的项目列出,请给我一段代码,万分感谢

set conn = server.createobject("adodb.connection")
conn.open"DBQ="&server.mappath("数据库地址")&";DRIVER={Microsoft Access Driver (*.mdb)};"
set rs=server.CreateObject("adodb.recordset")
rs.open"select 表名 where age='23'",conn,1,1
if rs.eof then
response.write"没有数据"
response.end()
end if
do while not rs.eof
你要输出的数据
rs.movenext
loop
rs.close
rs=nothing
conn.close
conn=nothing

Select * From 表名字 where age="23"

select * from 数据表 where age='23'