% on error resume next if isempty(request("idPhoto")) then response.redirect "viewAllPhotos.asp?error="& escape("ERROR: You must select a photo before adding a pricing option.") response.end end if %> <% dim proc, rs, idPricing, idPhoto dim name, size, price, resin_price, description, make_offer, offer_limit, is_active, in_stock dim status_msg, title, hierarchy(4, 2) status_msg = "" title = "Create Pricing Option" hierarchy(0, 0) = "Home" hierarchy(0, 1) = "home.asp" hierarchy(1, 0) = "Inventory Management" hierarchy(1, 2) = "inventoryOverview.asp" hierarchy(2, 0) = "Photographs" hierarchy(2, 1) = "viewAllPhotos.asp" hierarchy(3, 0) = "Add Pricing Option" hierarchy(3, 1) = "createPricing.asp" idPhoto = cLng(request("idPhoto")) set adoProc = server.createObject("ADODB.Command") if not isempty(request.form("btnInsertPricing")) then proc = run_proc_return(adoProc, "sp_insertPricing", adExecuteNoRecords, idPricing, adInteger) if proc = true then status_msg = status_msg &"
Successfully Inserted Pricing Option ID # "& idPricing &"
ERROR: Could not insert pricing option.
"& proc &"
ERROR: Could not retrieve photograph info.
"& proc &"