日期:2014-05-17  浏览次数:20953 次

asp删除记录时出错(用Dreamweaver自带功能)
从第一页(manager.asp)中点“删除”,后在第二页(delete.asp)中显示所要删除的东东,再在第二页中点删除就完成了,但是老是出错

以下是第一页“删除”部分的代码
<A   HREF= "delete.asp? <%=   Server.HTMLEncode(MM_keepNone)   &   MM_joinChar(MM_keepNone)   &   "title= "   &   Recordset1.Fields.Item( "title ").Value   %> "> 删除 </A> </td>

以下是第二页(delete.asp)中的出错部分的代码
<%
'   ***   Delete   Record:   construct   a   sql   delete   statement   and   execute   it

If   (CStr(Request( "MM_delete "))   <>   " "   And   CStr(Request( "MM_recordId "))   <>   " ")   Then

    '   create   the   sql   delete   statement
    MM_editQuery   =   "delete   from   "   &   MM_editTable   &   "   where   "   &   MM_editColumn   &   "   =   "   &   MM_recordId

    If   (Not   MM_abortEdit)   Then
        '   execute   the   delete
        Set   MM_editCmd   =   Server.CreateObject( "ADODB.Command ")
        MM_editCmd.ActiveConnection   =   MM_editConnection
        MM_editCmd.CommandText   =   MM_editQuery
        MM_editCmd.Execute '{提示在此处出错,错误类型:
Microsoft   OLE   DB   Provider   for   ODBC   Drivers   (0x80040E14)
[Microsoft][ODBC   Microsoft   Access   Driver]   语法错误   (逗号)   在查询表达式   'title   =   1,   000dddddddddyyyyyyyyyyyyyyyyyyy '   中。}
       
MM_editCmd.ActiveConnection.Close

        If   (MM_editRedirectUrl   <>   " ")   Then
            Response.Redirect(MM_editRedirectUrl)
        End   If
    End   If

End   If
%>


谢谢了!!!!

------解决方案--------------------
MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = ' " & MM_recordId & " ' "
------解决方案--------------------
MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " in ( " & MM_recordId & ") "

------解决方案--------------------
MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId
试试这句
------解决方案--------------------
权限不对 你的硬盘是NTFS吧

把数据库所在的文件夹加上可写权限!~~