猿人星球3迅雷:ASP中提取数据库字段中包括空格的搜索关键字后不能显示

来源:百度文库 编辑:神马品牌网 时间:2024/05/12 04:31:41
各位大哥:
是这的
我的网站是英文版的(当然在数据库中就会有空格)
前台分类调用时,从数据库中提取的字段是显示的,
但是在传递的时候就会只出现空格前面的字
哪位高手指点一下
谢谢~
代码的一部分是这样的:

<!-- #include file="../mycnstr.asp" -->
<!--#include file="config.asp"-->
<!--#include file="ubbcode.asp"-->
<!--#include file="function.asp"-->

<%
dim strFileName,MaxPerPage,ShowSmallClassType
dim totalPut,CurrentPage,TotalPages
dim BeginTime,EndTime
dim founderr, errmsg
dim BigClassName,SmallClassName,SpecialName,keyword,strField
dim rs,sql,sqlArticle,rsArticle,sqlSearch,rsSearch,sqlBigClass,rsBigClass,sqlSpecial,rsSpecial
dim SpecialTotal
BeginTime=Timer
BigClassName=request("BigClassName")
SmallClassName=request("SmallClassName")
SpecialName=request("SpecialName")
keyword=request("keyword")
if keyword<>"" then
keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","<"),">",">")," "," ")
end if
strField=trim(request("Field"))

if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
set conn=server.CreateObject("ADODB.Connection")
conn.open mycnstr

sqlBigClass="select * from BigClass order by BigClassID"
Set rsBigClass= Server.CreateObject("ADODB.Recordset")
rsBigClass.open sqlBigClass,conn,1,1

'=================================================
'过程名:ShowSmallClass_Tree
'作 用:树形目录方式显示栏目
'参 数:无
'=================================================
sub ShowSmallClass_Tree()
if rsBigClass.bof and rsBigClass.eof then
response.Write "栏目正在建设中……"
else
dim sqlClass,rsClass,strTree,BigClassNum,i,j
rsBigClass.movefirst
BigClassNum=rsBigClass.recordcount
i=1
do while not rsBigClass.eof
if i<BigClassNum then
strTree=""
else
strTree=""
end if
sqlClass="select * from SmallClass where BigClassName='" & rsBigClass("BigClassName") & "' Order by SmallClassID"
Set rsClass= Server.CreateObject("ADODB.Recordset")

rsClass.open sqlClass,conn,1,1
%>
<table width=212 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=212 height=19 colspan=2>
<a href=Product.asp?BigClassName=<%=rsBigClass("BigClassName")%>>
<b><%=rsBigClass("BigClassName")%></b>
</a></td>
</tr>
<% do while not rsclass.eof %>
<tr>
<td width="30" valign="top">  <font color=#999999>·</font></td>
<TD width=180 >
<%guanjianzi=rsClass("smallClassName")%>
<a href=Product.asp?BigClassName=<%=rsBigClass("BigClassName")%>&smallClassName=<%=guanjianzi%>>
<%=rsClass("smallClassName")%>
</a></td></TR>
<%rsClass.movenext
loop%>
</table>
<%rsBigClass.movenext
i=i+1
loop
rsClass.close
set rsClass=nothing
end if
end sub

???是用的input? VALUE=""

加上"