请问下如何对access数据库里备注型字段进行模糊查询?急!在线等这个问题你是怎么解决的呢??
展开全部
<!--#include file="conn.asp" -->
<%
searcharea = request.Form("searcharea")
sql = "select * from cnartile where cn_content like '%"&searcharea&"%'"
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.Write("暂无数据")
else
while not rs.eof
response.Write("<p>"&rs("cn_content")&"</p>")
rs.movenext
wend
end if
rs.close
set rs= nothing
conn.close
set conn = nothing
%>
其实就是个LIKE的SQL语句
<%
searcharea = request.Form("searcharea")
sql = "select * from cnartile where cn_content like '%"&searcharea&"%'"
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.Write("暂无数据")
else
while not rs.eof
response.Write("<p>"&rs("cn_content")&"</p>")
rs.movenext
wend
end if
rs.close
set rs= nothing
conn.close
set conn = nothing
%>
其实就是个LIKE的SQL语句
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询