首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

Microsoft OLE DB Provider for ODBC Drivers '80040e37'解决方法

2012-12-30 
Microsoft OLE DB Provider for ODBC Drivers �'Microsoft OLE DB Provider for ODBC D

Microsoft OLE DB Provider for ODBC Drivers '80040e37'
Microsoft OLE DB Provider for ODBC Drivers '80040e37' 

[Microsoft][ODBC Microsoft Access Driver] Microsoft Jet 数据库引擎找不到输入表或查询 'Package'。 确定它是否存在,以及它的名称的拼写是否正确。 

\admin\admin_Package.asp, line 68

<!--#include file="../inc/Conn.asp" -->
<!--#include file="seeion.asp"-->
<!--#include file="page.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" id="css" href="images/style.css">
<title>服务报价管理</title>
<script language="javascript"> 
<!-- 
function CheckAll(){ 
 for (var i=0;i<eval(form1.elements.length);i++){ 
  var e=form1.elements[i]; 
  if (e.name!="allbox") e.checked=form1.allbox.checked; 
 } 

--> 
</script> 
<%
Function DelHtml(Str1)
  Dim regEx
  Set regEx = New RegExp
  regEx.Pattern = "(<[^>]*?>)"
  regEx.Global = True
  regEx.IgnoreCase = True
  DelHtml = replace(regEx.Replace(""&str1,""),"&nbsp;","")
End Function
%>
<%
Function InterceptString(txt,length)
    txt=trim(txt)
    x = len(txt)
    y = 0
    if x >= 1 then
        for ii = 1 to x
            if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then '如果是汉字
                y = y + 2
            else
                y = y + 1
            end if
            if y >= length then
                txt = left(trim(txt),ii) '字符串限长
                exit for
            end if
        next
        InterceptString = txt
    else
        InterceptString = ""
    end if
End Function
%>
</head>
<body>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666">
  <tr>
    <td height="30" background="images/bg_list.gif"><div  style="padding-left:10px; font-weight:bold; color:#FFFFFF">报价管理</div></td>


  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
      <form id="form1" name="form1" method="post" action="admin_Package.asp?del=checkbox">
        <tr>
          <div style="text-align:left; background-color:#F1F5F8; height:25px; padding:2px 10px 2px 10px;">          </div>
          <td colspan="2">
  <%
set rs=server.createobject("adodb.recordset")
exec="select * from Package order by id desc"  
rs.open exec,conn,3,1 
if rs.eof then
response.write ("<div style=""padding:10px;"">暂无记录!</div>")
else
rs.PageSize =20 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount 
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif  page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
%>
            <% 
for i=1 to rs.pagesize 
j=i 
if j mod 2=0 then 
bg="#F1F5F8" 
else 
bg="#FFFFFF" 
end if 
%></td></tr>
        <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='<%=bg%>'" bgcolor="<%=bg%>">
          <td colspan="3" ><table width="100%" border="0" cellpadding="5" cellspacing="0">
            <tr>
              <td width="9%" class="td"><input name="ID" type="checkbox" id="ID" value="<%=rs("id")%>" />
                <%=rs("id")%></td>
              <td width="28%" height="25" class="td"><a href="xiugai_Package.asp?id=<%=rs("id")%>"><%=InterceptString(DelHtml(rs("title")),50)%></a>
                <%
if rs("tuijian")=1 then
response.Write("<font color=#FF0000>[推荐]</font>")
else
end if
%></td>
              <td width="19%" class="td">价格:<%=rs("jiage")%></td>
              <td width="18%" class="td"><%=rs("data")%></td>
              <td width="8%" class="td"><div align="center">
                <input type="button" name="Submit3" value="修改" onclick="window.location.href='xiugai_Package.asp?id=<%=rs("id")%>' "  class="btn"/>


              </div></td>
              <%if session("qx")=2 then%>
              <td width="7%" class="td"><div align="center">
                <input type="button" name="Submit" value="删除" onclick="javascript:if(confirm('确定删除?删除后不可恢复!')){window.location.href='admin_Package.asp?id=<%=rs("id")%>&amp;del=ok';}else{history.go(0);}"  class="btn"/>
              </div></td>
              <%end if%>
            </tr>
          </table>
            <% 
rs.movenext 
if rs.eof then exit for 
next 
%>
            <%
end if
%></td>
        </tr>
        <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='<%=bg%>'" bgcolor="<%=bg%>">
          <td width="270" height="30"><div style="padding-left:5px;">
            <input type="checkbox" name="allbox" onclick="CheckAll()" />&nbsp;<select name="lx">
            <option selected="selected" value="">操作类型</option>
            <option value="1">批量推荐</option>
            <option value="2">取消推荐</option>
            <option value="3">批量删除</option>
          </select>
            <input type="submit" name="button" id="button" value="提交"  class="btn"/>
          </div></td>
          <td width="706"><%call PageControl(iCount,maxpage,page,"border=0 align=right","<p align=right>")
rs.close
set rs=nothing
%></td>
        </tr>
      </form>

    </table></td>
  </tr>
</table>
</body>
</html>
<%
if request("del")="ok" then
set rs=server.createobject("adodb.recordset")
id=Request.QueryString("id")
sql="select * from Package where id="&id
rs.open sql,conn,2,3
rs.delete
rs.update
Response.Write "<script>alert('当前产品删除成功!');window.location.href='admin_Package.asp';</script>"
end if 
%>
<%
if Request.QueryString("del")="checkbox" then
if Request("id")="" then
Response.Write "<script>alert('错误!请选择要操作的记录!');window.location.href='admin_Package.asp';</script>" 


response.end()
end if
if Request.QueryString("del")="checkbox" then
lx=request.Form("lx")
if lx="" then
Response.Write "<script>alert('请选择操作类型!');window.location.href='admin_Package.asp';</script>" 
response.end
end if
if lx=1 then
sql="update Package set tuijian=1 where id in ("&Request("id")&")" 
conn.execute(sql) 
end if
if lx=2 then
sql="update Package set tuijian=0 where id in ("&Request("id")&")" 
conn.execute(sql) 
end if
if lx=3 then
sql="delete from Package where id in ("&Request("id")&")"
conn.Execute ( sql )
end if
conn.close
set conn=nothing
Response.Write "<script>alert('操作成功!');window.location.href='admin_Package.asp';</script>" 
end if
end if
%>
[解决办法]
错误信息已经很明显了,好好检查下Package这个表或者字段是否存在,是不是拼写错误!

热点排行