回 帖 发 新 帖 刷新版面

主题:求助查询页面

<!-- #include file="conn1.asp" -->
<html>
<!--#include file="ADOFunctions.asp"-->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link rel="stylesheet" href="css/admin.css" type="text/css">
</head>
<body>


<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="595" height="49" align="left" valign="middle"> 
      <p><font color="red"><%=session("username")%>
        </font> :欢迎您进入客户服务管理系统! </p></td>
  </tr>
  <tr> 
    <td width="595" height="30" align="center"><font color="#000000" size="+1">客 
      户 信 息 列 表</font> </td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
   <tr> 
    <td height="73"><table  height="12%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
        <tr align="center">
          <td width="90" align="center">票单号</td> 
          <td width="102" align="center">录入时间</td>
          <td width="149" align="center"> 姓名</td>
          <td width="149" align="center">安装地址</td>
          <td width="115" align="center">联系电话</td>
          <td width="114">安装时间</td>
          <td colspan="2" align="center">服务人员</td>
          <td width="138" align="center">备注</td>
        </tr> 
    <%
    dim keyword,rs
    keyword = trim(Request("keyword"))
    strsql="select * from mn where title like '%"&amp; keyword &amp;"%' "
    set rs = Server.CreateObject("ADODB.Recordset")
    [color=FF0000]rs.open strsql,conn,1,1[/color]
        if not rs.bof and not rs.eof then
        Page=request.QueryString("page")
        if page="" then 
           page=1
        else
           page=CInt(page)
        end if
        rs.PageSize=15
        rs.AbsolutePage=page
        ShowPage=page
        Dim I
        I=rs.PageSize
        do while not rs.eof and I>0
              I=I-1
             bna=rs("no")
                         bnb=rs("time")
                         bn=rs("name")
             bname=rs("addr")
                         bnc=rs("tel")
                         bnd=rs("data")
             ba=rs("label")
             bs=rs("remark")
            %>
        <tr align="center">
          <td width="90" align="center"><%=bna %></a></td> 
      <td width="102" align="center"><%=bnb %></a></td>
      <td width="149" align="center"><%=bn %></a></td>      
          <td width="149" align="center"><%=bname %></a></td>          
          <td width="115" align="center"><%= bnc %></td>
          <td width="114"><%= bnd %></td>
          <td colspan="2" align="center"><%=ba %></a></td>
          <td width="138" align="center"><%=bs %></a></td>
        </tr>
        <%
        rs.movenext
        loop
        if rs.RecordCount<1  then
        %>
        <tr align="center">
          <td height="27"></td> 
          <td></td>
          <td colspan="5" class="title">对不起,目前还没有任何客户的信息!</td>
          <td width="79"></td>
          <td></td>
        </tr>
        <tr>
          <td height="3"></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td width="24"></td>
          <td></td>
          <td></td>
        </tr>
        <%
        end if
        %>
    </table></td>
  </tr>
   <tr> 
    <td height="29" colspan="2" valign="middle"> 
      <p align="right"><font color="#FFFFFF">  
        第<%= ShowPage %>页&nbsp; 共<%=rs.PageCount%>页&nbsp; <%=rs. RecordCount %>条记录&nbsp;</font> <font color="#FFFFFF"> 
        <%if ShowPage>1then %>
        <a href="search888.asp?page=1">首页</a> 
        <%else%>
        首页 
        <% end if %>
        &nbsp; 
        <%if ShowPage>1then %>
        <a href="search888.asp?page=<%=ShowPage-1%>">前页</a> 
        <%else%>
        前页 
        <% end if %>
        &nbsp; 
        <% if  ShowPage<rs.PageCount then  %>
        <a href="search888.asp?page=<%=ShowPage+1%>">后页</a> 
        <%else%>
        后页 
        <% end if %>
        &nbsp; 
        <%if  ShowPage<rs.PageCount  then %>
        <a href="search888.asp?page=<%=rs.PageCount%>">末页</a> 
        <%else%>
        末页 
        <% end if %>
        &nbsp; &nbsp; &nbsp; </font></td>
  </tr>
  <%
        end if
  %>
</table>
<table width="600" height=20 border=0 align="center" cellpadding=0 cellspacing="1" >
  <tr align="center"> 
    <form action="search888.asp" method="post">
      <td height="20" > &nbsp;&nbsp; &nbsp;&nbsp;信息关键字: 
        <input name="keyword" size="30" maxlength="20" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value=<%=keyword%>>
        <INPUT type=submit value=搜索 name=Submit>
        &nbsp;搜索关键字[<font color=red><%=keyword%></font>]&nbsp;共有:<font color="red" face="verdana"><%=Rs.recordcount%></font>个 
        

        

        *支持精确查询与模糊查询,请输入信息* </td>
    </form>
  </tr>
</table>
</body>
</html>


页面显示有错误

ADODB.Recordset 错误 '800a0bb9' 
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。 

/1/search888.asp,行 41 
 不知道是什么原因 求助 
 

数据库和页面如下

回复列表 (共3个回复)

沙发

strsql="select * from mn where title like '%"&amp; keyword &amp;"%' "
改为
strsql="select * from mn where title like '%"&amp&"' and  keyword '"&amp&"%' "

板凳

按照你所改的 测试还是不行啊。怎么回事啊郁闷啊
还是显示这个

:欢迎您进入客户服务管理系统! 
 
客 户 信 息 列 表  
票单号 录入时间 姓名 安装地址 联系电话 安装时间 服务人员 备注 
ADODB.Recordset 错误 '800a0bb9' 
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。 

/1/search888.asp,行 41 
 
 

3 楼

最好检查一下数据库里面有无mu表,mu表里面有无title,是不是字段明写错了

我来回复

您尚未登录,请登录后再回复。点此登录或注册