| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 415 人关注过本帖
标题:求大神解决无法删除东西的代码问题
只看楼主 加入收藏
a200678751
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-2-25
结帖率:0
收藏
已结贴  问题点数:20 回复次数:2 
求大神解决无法删除东西的代码问题
没法删除东西


Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]第 1 行: ')' 附近有语法错误。
/admin/admin_article.asp,行 13



<!--#include virtual="/ac_common/jc_first.asp"-->
<!--#include virtual="/ac_common/jc_Ourfunction.asp"-->
<!--#include virtual="/ac_common/function.asp"-->
<!--#include virtual="/ac_common/md5.asp"-->
<!--#include file="sub.asp"-->
<%
Dim act,lmid,showtitle,Artisql,q
act=Request.QueryString("act")
lmid=Request.QueryString("lmid")
q=Request.Form("q")

if act="del" Then

conn.execute("delete from "&TableFront&"articles where id in("&Request.Form("selectdel")&")")

INoteC="提交来源:http://"&Request.ServerVariables("SERVER_NAME")&Request.ServerVariables("PATH_INFO")

INoteC=INoteC&"<br>提交方式:"&Request.ServerVariables("HTTP_METHOD")

INoteC=INoteC&"<br>提交操作:删除了ID为"&Request.Form("selectdel")&"的文章!"

Call InsertCaoZuoNote(LanRen_AdminCookies,INoteC)
End iF
IF lmid="999999" Then

showtitle="公告"

Artisql="Select * from "&TableFront&"Articles where arti_typeid=999999 and arti_title like '%"&q&"%' order by arti_date"
Else

showtitle="帮助中心"

Artisql="Select * from "&TableFront&"Articles where arti_typeid<>999999 and arti_title like '%"&q&"%' order by arti_date"
End IF
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="adcss.css" />
<script>
function mm()//全选、取消多选框
{
   var a = document.form1.getElementsByTagName("input");
   if(a[0].checked==true){
   for (var i=0; i<a.length; i++)
      if (a.type == "checkbox") a.checked = false;
   }
   else
   {
   for (var i=0; i<a.length; i++)
      if (a.type == "checkbox") a.checked = true;
   }
}
</script>
</head>
<body>
<br>
<form name="form2" method="post" action="admin_article.asp?lmid=<%=lmid%>">
  <table width="98%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><span class="font5">信息搜索:</span>
        <label>
        <input name="q" type="text" id="q">
        <input type="submit" name="Submit" value="提交">
      </label></td>
    </tr>
  </table>
</form>
<br>
<table width="98%" border="1" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF" bordercolorlight="#CCCCCC">
  <tr>
    <td colspan="4" bgcolor="#EBEBEB" class="font5"><%=showtitle%></td>
  </tr>
  <tr>
    <td colspan="4"><form name="form1" method="post" action="admin_article.asp?act=del">
      <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#EBEBEB">
        <tr>
          <td align="center" bgcolor="#F2F2F2" class="font4">标题</td>
          <td align="center" bgcolor="#F2F2F2" class="font4">类别</td>
          <td align="center" bgcolor="#F2F2F2" class="font4">添加时间</td>
          <td align="center" bgcolor="#F2F2F2" class="font4">删除</td>
        </tr>

<%

Dim rs,i

i=0

Set rs=server.CreateObject("adodb.recordset")

rs.open artiSql,conn,1,1

if not rs.eof Then

do while not rs.eof

i=i+1



%>
        <tr>
          <td align="center" bgcolor="#FFFFFF"><a href="admin_editarticle.asp?id=<%=rs("id")%>"><%=rs("arti_title")%></a></td>
          <td align="center" bgcolor="#FFFFFF">

  <%

  IF rs("arti_typeid")=99999 Then

  Response.Write "公告"

  Else

  
Dim lbrs

Set lbrs=conn.execute("select hp_title from "&tablefront&"helpLM where id="&rs("arti_typeid"))

if not lbrs.eof Then

Response.Write lbrs("hp_title")

End IF

Set lbrs=nothing

      End IF

  %>

  </td>
          <td align="center" bgcolor="#FFFFFF"><%=rs("arti_date")%></td>
          <td align="center" bgcolor="#FFFFFF"><label>
            <input name="selectdel" type="checkbox" id="selectdel" value="<%=Nown%>">
          </label></td>
        </tr>

<%

rs.movenext

loop

end if

%>
        <tr>
          <td colspan="4" align="right" bgcolor="#FFFFFF">全选
            <input type="checkbox" name="checkbox" value="Check All" />
            <input name="Submit2" type="submit" class="botton1" value="删除所选信息"></td>
          </tr>
      </table>
        </form>
    </td>
  </tr>
</table>
<br>
<%footer()%>
</body>
</html>
搜索更多相关主题的帖子: 东西 Microsoft include admin 
2013-02-25 01:43
学荟宁静
Rank: 2
来 自:广东
等 级:论坛游民
帖 子:10
专家分:37
注 册:2013-2-22
收藏
得分:10 
SQL语句有错啊。。。调试一下,把语句拿到数据库执行一下,解决好语法问题后再改代码!

虚空虚空,一切皆是虚空
2013-02-25 10:04
elongtown
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:12
帖 子:138
专家分:1003
注 册:2013-2-18
收藏
得分:10 
改成Artisql="Select * from '"&TableFront&"Articles where arti_typeid=999999 and arti_title like %'"&q&"'% order by arti_date"试试
2013-02-26 09:29
快速回复:求大神解决无法删除东西的代码问题
数据加载中...
 
   



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

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