<%@ Language=VBScript %> <% PIPath= Server.MapPath("\") & "\Uploads\ProductImages\" ProdID = Request.QueryString("PID") OpenConnection1 Set rs=Server.CreateObject("ADODB.Recordset") Set del=Server.CreateObject("SoftArtisans.SAFile") SEL="SELECT txtImage FROM Products WHERE ProductID="&ProdID rs.Open SEL,DB,1,3 If rs("txtImage")<>"" then del.Delete PIPath&rs("txtImage") rs.Close SQL = "DELETE P_Specs WHERE nProductID="&ProdID DB.Execute(SQL) SQL = "DELETE Products WHERE ProductID="&ProdID DB.Execute(SQL) Response.Redirect("Product_List.asp") %>