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

异常提示80040e14

2013-04-20 
错误提示80040e14Microsoft OLE DB Provider for ODBC Drivers80040e14 [Microsoft][ODBC SQL Server Dr

错误提示80040e14
Microsoft OLE DB Provider for ODBC Drivers  '80040e14' 
[Microsoft][ODBC SQL Server Driver][SQL Server]'=' 
/user/Classdel.asp 23 
第23行是:conn.execute (sql)

classdel是取classID的时候错了吗?如果是字符串应该怎么改?

产品类别管理表中查询出数据点击某个数据查看详细信息到classmod,点击删除按钮到达classdel表出错(产品类别表  classmod表 classdel表  依次向下)
产品类别表  
<%@ LANGUAGE = VBScript CodePage = 65001%>
<!--#include file="../incc/const.asp"-->
<!--#include file="../incc/conn.asp"-->
<!--#include file="../checkUser.asp"-->
<!--#include file="../incc/func.asp"-->
<html>
<head>
<title>类别维护</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../main.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<table width="99%" border="5" align="center" cellpadding="5" cellspacing="5" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td height="20" align="left" background="./images/topbg.gif">
<img src="../sys_images/file.gif">&nbsp;&nbsp;<font color="#FF3300" ><b>类别管理</b></font></div>
</td>
</tr>
<tr>
<td width="100%">
<table width="98%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#CCCCCC">
  <tr bgcolor="#5EA5E6"> 
    <td width="15%" nowrap  bgcolor="#EFEFEF" height="25"> 
      <div align="center"><font color="#336699">类别编号</font></div>
    </td>
    <td width="17%" nowrap bgcolor="#EFEFEF"> 
      <div align="center"><font color="#336699">类别名称</font></div>
    </td>
  </tr>
<%
sql="select * from Class"
page=Request("page")
if maxPerPage="" or not isnumeric(maxPerPage) then maxPerPage=10
if (page="" or isempty(page) or not isnumeric(page)) then page=1
set rs = CreateRecordSet(sql)
if rs.eof or rs.bof then
response.write "<tr><td height=40 align=center valign=middle>暂无产品</td></tr>"
else
Dim CurrentPage,index
index=1                               
If Request("CurrentPage")="" Then                               
    CurrentPage=1                               
Else                               
CurrentPage=Request("CurrentPage")                               


End If                                   
    Rs.PageSize=maxPerPage                             
    If Not(Rs.Eof And Rs.Bof) Then                               
        Rs.AbsolutePage=CurrentPage                               
    End If                               
Dim sKey,WorkType             
          
Dim I                               
   For I=1 To Rs.PageSize                               
       If Rs.Eof Then                               
         Exit For                               
     End If
%>
  <tr title="点击查看具体信息" style="cursor:hand" onClick="Javascript:window.location='Classmod.asp?id=<%=rs("id")%>'" > 
    <td width="15%" bgcolor="#F8F8F8" height="25">
      <div align="center"><%=rs("classID")%>&nbsp;</div>
    </td>
    <td width="17%" bgcolor="#F8F8F8" height="25">
      <div align="center"><%=rs("className")%>&nbsp;</div>
    </td>
  </tr>
<% 
 Rs.MoveNext
 index=index+1
 Next 
end if

%> 
  <tr bgcolor="#EFEFEF"> 
    <td colspan="2"> 
      <div align="right">
<%
Call PageList(Rs.PageCount,CurrentPage,theUrl)
rs.close
set rs=nothing   
call endConnection()
%>   
      </div>
    </td>
  </tr>
</table>
    </td>
  </tr>
</table>
</body>
</html>
详细信息表(classmod) 
<!--#include file="../incc/const.asp"-->
<!--#include file="../incc/conn.asp"-->
<!--#include file="../checkUser.asp"-->


<%
dim rs,sql
set rs=server.createobject("adodb.recordset")
dim id
id=request("id")
if isnull(id) or not isnumeric(id) then id=0
id=cint(id)
sql="select * from Class where id="&id
'response.write sql
'response.End
rs.open sql,conn,1,1
if not (rs.eof or err) then
%>
<html>
<head>
<title>类别维护</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="main.css" type="text/css">
<script language=Javascript>
<!--
function deleteMe(){
if (confirm("确定删除")==1){
window.location="Classdel.asp?classID=<%=Request("classID")%>";
}
}
//-->
</script>
</head>

<body bgcolor="#9CC7EF" text="#000000">
<br>
<br>
<br>
<br>
<form method="post" action="Classmodsave.asp" name="form1">
  <table width="98%" border="1" bordercolor=#145AA0 cellspacing="0" cellpadding="4" align="center">
    <tbody> 
    <tr> 
      <td colspan=2 height="18" bgcolor="#4296E7"> 
        <p align="center"><font color="#ffffff">类别管理</font></p>
      </td>
    </tr>
    <tr> 
      <td width=84 align="right" height="25" nowrap> 
        <div align="right">类别编号</div>
      </td>
      <td width="361" height="25"> 
        <input type="text" name="classID" size="20" value="<%=Trim(rs("classID"))%>" readOnly>
      </td>
    </tr>
    <tr> 
      <td width=84 align="right" height="25" nowrap> 
        <div align="right">类别名称</div>
      </td>
      <td width="361" height="25"> 
        <input type="text" name="className" size="20" value="<%=Trim(rs("className"))%>">
      </td>
    </tr>
    <tr> 
      <td colspan="2" align="right" height="26" nowrap bgcolor="#4296E7"> 
        <div align="center"> 
          <input type="button" name="Submit" value="删除" onClick="deleteMe()">
          <input type="submit" name="Submit2" value="修改">
          <input type="button" name="Submit3" value="取消" onClick="window.location='<%=session("adminOldUrl")%>'">
        </div>
      </td>
    </tr>


    </tbody> 
  </table>
</form>
</body>
</html>
<%end if %>
删除类别表(classdel表)
<!--#include file="../incc/const.asp"-->
<!--#include file="../incc/conn.asp"
<!--#include file="../checkUser.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%
dim intId
dim sql
intId=Request("classID")
set rs=server.createObject("adodb.recordset")
sql="select * from Class"
'response.write sql
'response.End
rs.open sql,conn,1,1
if rs.recordCount<=1 then%>
无法删除最后一个类别。<br>
<a href="Javascript:window.history.go(-1)">backtrack</a>
<%
response.End
end if
sql="delete from Class where classID="&intId
'response.write sql
'response.End
conn.execute (sql)
%>
<script language=Javascript>
<!--
alert("删除成功!");
window.location="<%=session("adminoldUrl")%>"
//-->
</script>

求高手解决!!!!!!
[解决办法]
你Class这个表名换一个试试。
[解决办法]
我晕,你都贴的什么代码,关键代码没指明,谁有空看你那么多代码

字段是nvarchar要用 ''括起

热点排行