标题:asp站内查询出错
取消只看楼主
ashimaxigo
Rank: 2
等 级:论坛游民
帖 子:29
专家分:17
注 册:2012-12-24
结帖率:75%
已结贴  问题点数:20 回复次数:1 
asp站内查询出错
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。
/checklist.asp, 第 23 行
 
    <%
        dim flagb,bname,ynum,dydj,stype,sdate
        bname=request("sousuo")
        ynum=request("sousuo")
        dydj=request("sousuo")
        stype=request("sousuo")
        sdate=request("sousuo")
        %>
                <%
set rs=server.CreateObject("adodb.recordset")
sql="select * from byqmp where bname='"&bname&"' or ynum='"&ynum&"' or dydj='"&dydj&"' or stype='"&stype&"' or sdate='"&sdate&"'"
rs.open sql,conn,1,1 ‘第23行
rs.movefirst
        %>
搜索更多相关主题的帖子: 查询 Microsoft request sousuo 
2013-01-27 12:04
ashimaxigo
Rank: 2
等 级:论坛游民
帖 子:29
专家分:17
注 册:2012-12-24
得分:0 
呵呵,按你说的方法通过了,代码如下:
<!--#include file="conn.asp" -->
<link rel="stylesheet" href="../css/mm_travel2.css" type="text/css" />
<table width="100%" height="22" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#999999">
      <tr>
        <td width="8%" align="center" bordercolor="#FFFFFF" bgcolor="#00CCFF" class="l11"><strong>序    号</strong></td>
        <td width="12%" align="center" bordercolor="#FFFFFF" bgcolor="#00CCFF" class="l11"><strong>变电站名</strong></td>
        <td width="20%" align="center" bordercolor="#FFFFFF" bgcolor="#00CCFF" class="l11"><strong>运行编号</strong></td>
        <td width="20%" align="center" bordercolor="#FFFFFF" bgcolor="#00CCFF" class="l11"><strong>电压等级</strong></td>
        <td width="20%" align="center" bordercolor="#FFFFFF" bgcolor="#00CCFF" class="l11"><strong>试验日期</strong></td>
        <td width="20%" align="center" bordercolor="#FFFFFF" bgcolor="#00CCFF" class="l11"><strong>点击查看</strong></td>
      </tr>   
          <%
        dim flagb,bname,ynum,dydj,stype,sdate
        bname=request("sousuo")
        ynum=request("sousuo")
        dydj=request("sousuo")
        stype=request("sousuo")
        sdate=request("sousuo")
        %>
      <%
      set rs=server.CreateObject("adodb.recordset")
      sql="select * from byqmp where bname='"&bname&"'or ynum='"&ynum&"' or stype='"&stype&"'"
      rs.open sql,conn,1,1
        %>
<%if bname="" or ynum="" or dydj="" or stype="" or sdate="" then%>
                <tr>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("请填写查询内容")%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("请填写查询内容")%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("请填写查询内容")%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("请填写查询内容")%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("请填写查询内容")%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("请填写查询内容")%></td>
        </tr>
        <%else if not rs.eof then%>
        <%rs.movefirst%>
      <tr>
          <td height="22" align="center" bgcolor="#FFFFFF" class="p11"><%response.write(rs("flagb"))%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write(rs("bname"))%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write(rs("ynum"))%></td>
        <td align="center" bgcolor="#FFFFFF" class="p12"><%response.write(rs("dydj"))%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write(rs("sdate"))%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write " <a href ='byqprint.asp?bname="&bname&"or ynum="&ynum&" or stype="&stype&"' Target=_blank >详细页面</a>"%></td>
      </tr>
       <%else if rs.bof then%>
        <tr>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("暂无此类信息")%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("暂无此类信息")%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("暂无此类信息")%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("暂无此类信息")%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("暂无此类信息")%></td>
        <td align="center" bgcolor="#FFFFFF" class="p11"><%response.write("暂无此类信息")%></td>
        </tr>
<%end if%>
<%end if%>
<%end if%>
</table>

   

2013-01-27 23:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-397732-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.315665 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved