none
Microsoft JET Database Engine error '80040e21' The search key was not found RRS feed

  • 问题

  • Microsoft JET Database Engine error '80040e21'

    The search key was not found in any record.



    用户是asp+access的,没有用过asp,这个如何解决,是一个录入一些网站设置的页面,提示key找不到任何结果

    <%@ codepage ="936" %>
    <!--#include file="Inc/Topconfig.asp"-->
    <!--#include file="inc/conn.asp"-->
    <html>
    <% 
    dim action
    action=trim(request.form("action"))
    if action="Save" then
    set rs=server.CreateObject("adodb.recordset")
    rs.Open "select * from config ",conn,1,3
    rs("Company")=trim(request.form("Company"))
    rs("WebSite")=trim(request.form("WebSite"))
    rs("Address")=trim(request.form("Address"))
    rs("PostCode")=trim(request.form("PostCode"))
    rs("Tel")=trim(request.form("Tel"))
    rs("Fax")=trim(request.form("Fax"))
    rs("Mobil")=trim(request.form("Mobil"))
    rs("Email")=trim(request.form("Email"))
    rs("Contact")=trim(request.form("Contact"))
    rs("CompanyInfo")=trim(request.form("ContentCn"))
    rs("Title")=trim(request.form("Title"))
    rs("Keyword")=trim(request.form("Keyword"))
    rs("Descript")=trim(request.form("Descript"))
    rs("Key1")=trim(request.form("Key1"))
    rs("Key2")=trim(request.form("Key2"))
    rs("Key3")=trim(request.form("Key3"))
    rs.update
    rs.close
    set rs=nothing
    response.Write "<script language=javascript>alert('系统配置成功!');history.go(-1);</script>"
    end if
    %>
    <head>
    <META content="text/html; charset=gb2312" http-equiv=Content-Type>
    <link href=inc/bs.css rel=STYLESHEET type=text/css>
    <STYLE type=text/css>
    TD {
    COLOR: #000; FONT-FAMILY: 宋体; FONT-SIZE: 12px
    }
    .GR {
    COLOR: #666
    }
    .style1 {
    	font-size: 10pt;
    	color: #003399;
    }
    .style8 {color: #FF0000}
    .style9 {font-size: 10.5pt}
    </STYLE>
    <script LANGUAGE="JavaScript">
    function check()
    {
    if (document.myform.Company.value=="")
    {
    alert("公司名称必须填一项,不能为空!")
    document.myform.Company.focus()
    document.myform.Company.select() 
    return
    } 
    if (document.myform.Address.value=="")
    {
    alert("地址必须填一项,不能为空!")
    document.myform.Address.focus()
    document.myform.Address.select() 
    return
    } 
    if (document.myform.Tel.value=="")
    {
    alert("电话必须填写,不能为空!")
    document.myform.Tel.focus()
    document.myform.Tel.select() 
    return
    }
    if (document.myform.Email.value=="")
    {
    alert("Email必须填写,不能为空!")
    document.myform.Email.focus()
    document.myform.Email.select() 
    return
    }
    document.myform.submit() 
    }
    </SCRIPT>
    
    </head>
    <BODY text=#000000 leftMargin=0 topMargin=0 marginheight="0" marginwidth="0" bgcolor="#F7FBFF">
    <br>
    <div align="center">
    <%
    set rs=server.CreateObject("adodb.recordset")
    rs.open "select top 1 * from config",conn,1,1
    %>
    <TABLE width="80%" border=0 cellPadding=0 cellSpacing=0 bordercolor="#111111" bgColor=#005984 style="border-collapse: collapse">
    <TBODY>
    <tr><form method="POST" action="Config1.asp" name="myform">
    <TD align=middle>
    <CENTER>
    <table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#111111" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" id="AutoNumber2" style="border-collapse: collapse">
    
                          <tr bgcolor="#EEF7FF"> 
                            <TD colspan="4" height="20"> 
                              <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
                                <tr> 
                                  <TD height="24" bgcolor="#EEF7FF" width="770"> <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" bgcolor="#E1EFFF" id="AutoNumber2" style="border-collapse: collapse">
                                      <tr> 
                                        <td height="30" bgcolor="#E1EFFF"><div align="center"><span style="font-size: 10.5pt"><b><span class="style1"><span class="style9">系统基本配置</span></span></b></span> </div></td>
                                      </tr>
                                  </table></TD>
                                </tr>
                            </table></TD>
                          </tr>
                          <tr valign="middle" bgcolor="#EEF7FF"> 
                            <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>公司名称:</strong></div></td>
                            <TD colspan="3">&nbsp; <input name="Company" type="text" value="<%=rs("Company")%>" size="40" maxlength="100"> <span class="style8">*</span></td>
                          </tr>
    					  <tr valign="middle" bgcolor="#EEF7FF"> 
                            <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>公司网址:</strong></div></td>
                            <TD colspan="3">&nbsp; <input name="WebSite" type="text" value="<%=rs("WebSite")%>" size="40" maxlength="100"> <span class="style8">*</span></td>
                          </tr>
    					  <tr valign="middle" bgcolor="#EEF7FF"> 
                            <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>地址:</strong></div></td>
                            <TD colspan="2">&nbsp; 
                              <input name="Address" type="text" value="<%=rs("Address")%>" size="40" maxlength="100"></td>
                            <TD>&nbsp; <strong>邮编:</strong> <input name="PostCode" type="text" value="<%=rs("PostCode")%>" size="8" maxlength="8"></td>
    					  </tr>
    					  <tr valign="middle" bgcolor="#EEF7FF"> 
                            <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>联系电话(Tel):</strong></div></td>
                            <TD width="196">&nbsp;&nbsp;<input name="Tel" type="text" value="<%=rs("Tel")%>" size="20" maxlength="50"></td>
                      <TD width="113"><div align="right"><strong>传真(Fax):</strong></div></td>
                            <TD width="188">&nbsp;&nbsp;
                      <input name="Fax" type="text" value="<%=rs("Fax")%>" size="20" maxlength="50"></td>
    					  </tr>
    					  <tr valign="middle" bgcolor="#EEF7FF"> 
                            <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>手机(Mobil):</strong></div></td>
                            <TD>&nbsp;&nbsp;<input name="Mobil" type="text" value="<%=rs("Mobil")%>" size="20" maxlength="50"></td>
                            <TD><div align="right"><strong>联系人:</strong></div></td>
                            <TD>&nbsp;&nbsp;<input name="Contact" type="text" value="<%=rs("Contact")%>" size="20" maxlength="50"></td>
    					  </tr>
    					    <tr valign="middle" bgcolor="#EEF7FF"> 
                            <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>电子邮件(Email):</strong></div></td>
                            <TD colspan="3">&nbsp;&nbsp;<input name="Email" type="text" value="<%=rs("Email")%>" size="30" maxlength="50"></td>
                          </tr>
    					    <tr valign="middle" bgcolor="#EEF7FF"> 
                    <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>公司简介:</strong></div></td>
                    <TD colspan="3"><textarea name="ContentCn" cols="30" rows="4" style="display:none"><% =rs("CompanyInfo") %>
              </textarea><iframe id="frmEdit" src="../WebEdit/ewebeditor.asp?id=ContentCn&style=s_blue" frameborder="0" scrolling="no" width="100%" height="405"></iframe></td>
                 </tr>
    					    <tr valign="middle" bgcolor="#EEF7FF"> 
                    <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>标题:</strong></div></td>
                    <TD colspan="3" height=30><input name="Title" type="text" value="<% =rs("Title") %>" size="60"></td>
    					    </tr>
    					    <tr valign="middle" bgcolor="#EEF7FF"> 
                    <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>关键字:</strong></div></td>
                    <TD colspan="3" height=80><textarea name="Keyword" cols="60" rows="5"><% =rs("Keyword") %></textarea></td>
    					    </tr>
    					    <tr valign="middle" bgcolor="#EEF7FF"> 
                    <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>描述:</strong></div></td>
                    <TD colspan="3" height=80><textarea name="Descript" cols="60" rows="5"><% =rs("Descript") %></textarea></td>
    					    </tr>
    					    <tr valign="middle" bgcolor="#EEF7FF"> 
                    <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>标签1:</strong></div></td>
                    <TD colspan="3" height=80><textarea name="Key1" cols="60" rows="5"><% =rs("Key1") %></textarea></td>
    					    </tr>
    					    <tr valign="middle" bgcolor="#EEF7FF"> 
                    <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>标签2:</strong></div></td>
                    <TD colspan="3" height=80><textarea name="Key2" cols="60" rows="5"><% =rs("Key2") %></textarea></td>
    					    </tr>
    					    <tr valign="middle" bgcolor="#EEF7FF"> 
                    <TD width="115" height="30" align="right" valign="middle"><div align="right"><strong>标签3:</strong></div></td>
                    <TD colspan="3" height=80><textarea name="Key3" cols="60" rows="5"><% =rs("Key3") %></textarea></td>
    					    </tr>
                          <tr bgcolor="#CEDBFF"> 
                            <TD colspan="4" align="center" height="25"> 
    												<input name="Action" type="hidden" value="Save">
                              <INPUT class="f11" type="button" value=" 保 存 " onClick="check()">
                              &nbsp;&nbsp;&nbsp;&nbsp;
                              <INPUT class="f11" type="button" value=" 返 回 " onClick="window.location.href='Contact_Add.asp'">                        </TD>
                          </tr>
    					  
                          <tr> 
                            <TD colspan="4" align="center" height="12" bgcolor="#EEF7FF">&nbsp;</TD>
                          </tr>
                </table>
    </CENTER></TD></FORM>
    </tr>
    </TBODY></TABLE>
    <%
    rs.close
    set rs=Nothing
    conn.close
    set conn = Nothing
    %>
    </div> 
    </body>
    </html>
    
    
     
    
    2009年11月28日 2:21

答案

全部回复