日期:2014-05-16 浏览次数:21128 次
<% @CODEPAGE="65001"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<%
response.Write request.form("key")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("ab.mdb")
key=request.form("key")
set rs=server.CreateObject("adodb.recordset")
sql="select * from ab where name like ' % " & key & " % '"
rs.open sql,conn,1,1
rs.movefirst
while not rs.eof
%>
<%=rs("name")%>
<%
rs.movenext
wend
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
<!--#include file="conn.asp"-->
<%key=request.form("key")%>
<%
exec="select * from 表1 where 1=1 "
exec=exec+" and key'%" & key & "%' "
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
%>
<%do while not rs.eof%>
<%=rs("key")%><br>
<%
rs.movenext
loop
%>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>