fso删除问题。。

来源:百度知道 编辑:UC知道 时间:2024/06/07 15:55:30
<!--#include file="conn/conn.asp"-->
<%
dim ID
ID=request.Form("checkbox")
ID=split(ID,", ")
for i=0 to ubound(ID)
set rs=createobject("ADODB.Recordset")
sql="delete from xiaokao where id='"&ID(i)&"'"
conn.execute sql
FiLePaTh = server.MapPath("../../feng1/img/rs("mingzi").rar")
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.Fileexists(filepath) then
fso.DeleteFile(filepath)
end if
Set fso = nothing
next
response.Write"<script language=javascript>{window.alert('删除成功,返回上页!');history.go(-1);}</script>"
%>

其它的地方都没有问题。。就是路径有问题。。如果把RS("mingzi")换成常量测试就可以删除,问题就在RS这个地方。。请高手指教。。谢谢啦。。

你在上面的sql="delete from xiaokao where id='"&ID(i)&"'"
那里已经把mingzi这个字段里面的值从数据里删除了 rs("mingzi")怎么可能还会读出来?