<% '----------------------------------------------------------------- '--Page info '----------------------------------------------------------------- PAGE_NAME = "Program" PAGE_NAME_S = "Programs" '----------------------------------------------------------------- '--Page code '----------------------------------------------------------------- ID = Request.QueryString("ID") '----------------------------------------------------------------- '--delete the record from the database '----------------------------------------------------------------- Set DB = New clsDatabase DB.OpenDatabase DATABASE_NAME , DATABASE_USERNAME , DATABASE_PASSWORD numOfRecords = DB.RunQuery("SELECT large_image FROM library_programs WHERE id=" & ID) If numOfRecords = -1 Then Call myError("Invalid " & PAGE_NAME & " ID") Else imageName = DB.GetField("large_image") End If Call DB.RunQuery("DELETE FROM library_program_broadcasters WHERE program_id=" & ID) Call DB.RunQuery("DELETE FROM library_programs WHERE id=" & ID) Set DB = Nothing Set FileSys = New clsFileSystem FileSys.DeleteFile(PROGRAM_IMAGE_PATH & imageName) Set FileSys = Nothing '----------------------------------------------------------------- '-go back where we came from '----------------------------------------------------------------- Response.Redirect "index.asp" %>