execStr = "delete from app_td_fk_dl where 项目编号 = '" + seqno + "' and 地类名称 in ('" + str1 + "')";我要删除满足上述条件的记录,但是当“地类名称”是中文的时候,为什么删除不掉这个记录,而它为字母或数字型的时候可以删除。

解决方案 »

  1.   

    str1存的是选中要删除的记录的记录。就是实现多条记录删除的一个check类型
      

  2.   

    sub del()
    dim str, elem
    str = ""
    for each elem in document.all
    if elem.id="chk" then
    if elem.checked then
    if str = "" then
    str = elem.value
    else
    str = str & "," & elem.value
    end if
    end if
    end if
    next
    if str <> "" then
    if msgbox("确定要删除这些地类吗?",36) = 6 then
    window.open "fkdl.jsp?seqno=<%=request.getParameter("seqno")%>&del=" & str, "_self"
    end if
    else
    msgbox "请选择要删除的地类!"
    end if
    end sub
    </script>
      

  3.   

    你应该在每个地类名称加上引号,使得str1的值如这样
    '地类1','地类2'.'地类3'
    还需要把
    地类名称 in ('" + str1 + "')"改为
    地类名称 in (" + str1 + ")"
      

  4.   

    str1    的数据类型 、库的字符集 是什么样的啊?