<participant>
	<insertText location="aboveHTML+30"><![CDATA[<%
if (String(Request("MM_update")) == "@@formName@@") {
  if (!MM_abortEdit) {
    // execute the update
	
    var MM_editCmd = Server.CreateObject ("ADODB.Command");
    MM_editCmd.ActiveConnection = MM_@@cname@@_STRING;
    MM_editCmd.CommandText = "UPDATE @@table@@ SET @@joinedColumnsValues@@ WHERE @@escapedCol@@ = ?";
    MM_editCmd.Prepared = true;
    <@ loop(@@paramName@@, @@paramType@@, @@paramDirection@@, @@paramSize@@, @@paramValue@@, @@paramTypeDisplayName@@) @>MM_editCmd.Parameters.Append(MM_editCmd.CreateParameter("@@paramName@@", @@paramType@@, @@paramDirection@@, @@paramSize@@, @@paramValue@@)); // @@paramTypeDisplayName@@
    <@ endloop @>MM_editCmd.Execute();
    MM_editCmd.ActiveConnection.Close();<@ if (@@redirect__url@@) @>

    // append the query string to the redirect URL
    var MM_editRedirectUrl = "@@redirect__url@@";
    if (MM_editRedirectUrl && Request.QueryString && Request.QueryString.Count > 0) {
      MM_editRedirectUrl += ((MM_editRedirectUrl.indexOf('?') == -1) ? "?" : "&") + Request.QueryString;
    }
    Response.Redirect(MM_editRedirectUrl)<@ endif @>
  }
}
%>]]></insertText>
	<searchPatterns whereToSearch="directive">
		<searchPattern paramNames="formName,cname,table,joinedColumnsValues,escapedCol,MM_loop1,redirect__url" isOptional="false" limitSearch="all"><![CDATA[/if \(String\(Request\("MM_update"\)\) == "(.*?)"\) \{[ \t\r\n]+if \(!MM_abortEdit\) \{[ \t\r\n]+\/\/ execute the update[ \t\r\n]+var MM_editCmd = Server\.CreateObject \("ADODB\.Command"\);[ \t\r\n]+MM_editCmd\.ActiveConnection = MM_(.*?)_STRING;[ \t\r\n]+MM_editCmd\.CommandText = "UPDATE (.*?) SET (.*?) WHERE (.*?) = \?";[ \t\r\n]+MM_editCmd\.Prepared = true;[ \t\r\n]+((?:MM_editCmd\.Parameters\.Append\(MM_editCmd\.CreateParameter\(.*[ \t\r\n]+)*?)MM_editCmd\.Execute\(\);[ \t\r\n]+MM_editCmd\.ActiveConnection\.Close\(\);(?:[ \t\r\n]+\/\/ append the query string to the redirect URL[ \t\r\n]+var MM_editRedirectUrl = "(.*?)";[ \t\r\n]+if \(MM_editRedirectUrl && Request\.QueryString && Request\.QueryString\.Count >\s*0\) \{[ \t\r\n]+MM_editRedirectUrl \+= \(\(MM_editRedirectUrl\.indexOf\('\?'\) == -1\) \? "\?" : "&"\) \+ Request\.QueryString;[ \t\r\n]+\}[ \t\r\n]+Response\.Redirect\(MM_editRedirectUrl\))?[ \t\r\n]+\}[ \t\r\n]+\}(?=\r|\n|%>)/i]]></searchPattern>
		<searchPattern paramNames="paramName,paramType,paramDirection,paramSize,paramValue" limitSearch="@@MM_loop1@@" isOptional="true" searchType="multiple"><![CDATA[/MM_editCmd\.Parameters\.Append\(MM_editCmd\.CreateParameter\("(.*?)", (.*?), (.*?), (.*?), (.*?)\)\);/i]]></searchPattern>
	</searchPatterns>
	<quickSearch>MM_editCmd.ActiveConnection.Close();</quickSearch>
</participant>

<!-- participant modified by hand: we should not match the ending of the CreateParameter lines -->
