picurl=trim(conn.execute("select Previewimg from table where id="&request.querystring("id"))(0)) //取图片路径
conn.execute("delete from table where id="&request.querystring("id"))
conn.close //删除记录
set conn=nothing
'SET FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(Server.MapPath("uploadpic/"&picurl&"")) Then
objFSO.DeleteFile(Server.MapPath("uploadpic/"&picurl&"")) //图版如果存在就删除
end if