%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%> <% // *** Edit Operations: declare variables // set the form action variable var MM_editAction = Request.ServerVariables("SCRIPT_NAME"); if (Request.QueryString) { MM_editAction += "?" + Server.HTMLEncode(Request.QueryString); } // boolean to abort record edit var MM_abortEdit = false; // query string to execute var MM_editQuery = ""; %> <% // *** Delete Record: declare variables if (String(Request("MM_delete")) == "formSwapDel_del" && String(Request("MM_recordId")) != "undefined") { var MM_editConnection = MM_cnnMtn_STRING; var MM_editTable = "tblSwaps"; var MM_editColumn = "authorizationNbr"; var MM_recordId = "'" + String(Request.Form("MM_recordId")) + "'"; var MM_editRedirectUrl = "mtn_swp_list.asp?deleted"; // append the query string to the redirect URL if (MM_editRedirectUrl && Request.QueryString && Request.QueryString.Count > 0) { MM_editRedirectUrl += ((MM_editRedirectUrl.indexOf('?') == -1)?"?":"&") + Request.QueryString; } } %> <% // *** Delete Record: construct a sql delete statement and execute it if (String(Request("MM_delete")) != "undefined" && String(Request("MM_recordId")) != "undefined") { // create the sql delete statement MM_editQuery = "delete from " + MM_editTable + " where " + MM_editColumn + " = " + MM_recordId; if (!MM_abortEdit) { // execute the delete var MM_editCmd = Server.CreateObject('ADODB.Command'); MM_editCmd.ActiveConnection = MM_editConnection; MM_editCmd.CommandText = MM_editQuery; MM_editCmd.Execute(); MM_editCmd.ActiveConnection.Close(); // if (MM_editRedirectUrl) { // Response.Redirect(MM_editRedirectUrl); // } } } %> <% var rsSwaps__MMColParam = "1"; if (String(Request.Form("authorizationNbr")) != "undefined" && String(Request.Form("authorizationNbr")) != "") { rsSwaps__MMColParam = String(Request.Form("authorizationNbr")); } %> <% var rsSwaps = Server.CreateObject("ADODB.Recordset"); rsSwaps.ActiveConnection = MM_cnnMtn_STRING; rsSwaps.Source = "SELECT * FROM tblSwaps WHERE authorizationNbr = '"+ rsSwaps__MMColParam.replace(/'/g, "''") + "'"; rsSwaps.CursorType = 0; rsSwaps.CursorLocation = 2; rsSwaps.LockType = 1; rsSwaps.Open(); var rsSwaps_numRows = 0; %>
|
|
|
Remove A Sold Item |
There are no current Trading Places items with that Authorization Number. Try again.
<% } else {%><% } %> <% } } else {%>
The Trading Places Item has been deleted. Return to Trading Places list.
<% rsSwaps.Close(); %>