id=request("id")
set rs=server.CreateObject("adodb.recordset")
sql="Select * From picture where id="&id
rs.open sql,conn,1,3
a=rs("picture") '此处的a取到的是存放在数据库中图片的路径
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if objFSO.fileexists(Server.MapPath(a)) then
objFSO.deletefile Server.MapPath(a),true
end if
conn.execute("delete from picture where id="&id)
end sub