我的ASP代码如下,产品型号输入CA6240B时,翻页查询没有错误,当产品型号输入CA6240%时,程序出错,产品型号中显示style="HEIGHT:,上面地址栏显示
http://210.72.132.12/scheduling/asp/find_process_part.asp?qsrq1=2002-4-15&jsrq1=2003-4-15&ljh1=qb&cpxh1=CA6240%&Page=2
没有记录显示了,怎么改才行呀?
代码如下:
<%@ Language=VBScript %>
<% response.expires=0%>
<%
cpxh=trim(request("cpxh"))
cpxh1=trim(request("cpxh1"))
if cpxh1=""or isnull(cpxh1) then
if cpxh="" or isnull(cpxh) then cpxh="%"
elseif cpxh1="qb" then
cpxh1="%"
cpxh=cpxh1
end if
%>
<%
dim i
i=0
dim ss
ss="select * from jd_processing_part where product_type like "+cpxh+""
dim obj
dim RS
dim jls
set obj=Server.CreateObject("AssessMgr.AssMgr.1")
Set RS = Server.CreateObject("ADODB.RecordSet")
set RS = obj.GetRS(ss,msg)
jls=rs.RecordCount
%>
<P align=center><STRONG>
<font face="宋体" size="4">在制品统计信息查询</font>
</STRONG></P>
<FORM action="find_process_part.asp" method=post name=FORM1>
<P align=left><FONT color=darkblue></FONT><FONT size=2>
产品型号:<INPUT id=cpxh name=cpxh value=<%=cpxh%> style="HEIGHT: 22px; WIDTH: 63px" size="20">
<INPUT id=submit1 name=执行查询 type=submit value=执行查询 FONT><font color="navy" size="2"> </font></P>
</FORM>
<DIV align=left style="height: 55; width: 806">
<Form action="delete_process_info.asp?id=<%=jls%>" method=post name=nowjob>
<TABLE border=0 frame=box cellPadding=1 cellSpacing=1 width="755" height="16">
<TR>
<th width="52" style="BACKGROUND-COLOR: #e6e6e6; COLOR: blue; FONT-WEIGHT: lighter" align="center">
<p align="center"><font face="宋体" size="2">删除</font></p>
</th>
<th width="92" style="BACKGROUND-COLOR: #e6e6e6; COLOR: blue; FONT-WEIGHT: lighter" align="center"><font face="宋体" size="2">产品型号</font></th>
<th width="96" style="BACKGROUND-COLOR: #e6e6e6; COLOR: blue; FONT-WEIGHT: lighter" align="center"><font face="宋体" size="2">零件号</font></th>
<th width="126" style="BACKGROUND-COLOR: #e6e6e6; COLOR: blue; FONT-WEIGHT: lighter" align="center"><font face="宋体" size="2">零件名称</font></th>
<th width="36" style="BACKGROUND-COLOR: #e6e6e6; COLOR: blue; FONT-WEIGHT: lighter" align="center"><font face="宋体" size="2">台件</font></th>
<th width="91" style="BACKGROUND-COLOR: #e6e6e6; COLOR: blue; FONT-WEIGHT: lighter" align="center"><font face="宋体" size="2">累计收入数</font></th>
<th width="78" style="BACKGROUND-COLOR: #e6e6e6; COLOR: blue; FONT-WEIGHT: lighter" align="center"><font face="宋体" size="2">累计发出数</font></th>
<th width="64" style="BACKGROUND-COLOR: #e6e6e6; COLOR: blue; FONT-WEIGHT: lighter" align="center"><font face="宋体" size="2">结余</font></th>
<th width="36" style="BACKGROUND-COLOR: #e6e6e6; COLOR: blue; FONT-WEIGHT: lighter" align="center"><font face="宋体" size="2">修改</font></th>
<th width="53" style="BACKGROUND-COLOR: #e6e6e6; COLOR: blue; FONT-WEIGHT: lighter" align="center"><font face="宋体" size="2">查看</font></th>
</TR>
<%
RS.PageSize = 10
Page = CLng(Request("Page"))
If Page < 1 or isnull(Page) Then Page = 1
If Page > rs.PageCount Then Page = rs.PageCount
if not rs.EOF then
RS.AbsolutePage=page
FOR J=1 TO RS.PageSize
i=i+1
%>
<tr>
晕,这么多的代码!
你自已看看吧。
http://free.hxidc.com/stady/article/list.asp?id=178
在查询的那个form那这样写
<%if len(cpxh1)>0 then%>
<input type=hidden name="cpxh1" value=<%=cpxh1%>>
<%end if%>
在下一页的链接中就不要这个条件了