展开全部
<%
username="abc"'暂设置一个值
dim db
db="data.mdb
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db")
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from user where username="&username
rs.open sqlstr,conn,1,1
if rs.eof then
response.write"没有这个用户名"
else
response.write rs.username
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询