If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then >> >> ' create the sql update statement >> MM_UpdateQuery = "update " & MM_editTable & " set " >> For i = LBound(MM_fields) To UBound(MM_fields) Step 2 >> FormVal = MM_fields(i+1) >> MM_typeArray = Split(MM_columns(i+1),",") >> Delim = MM_typeArray(0) >> If (Delim = "none") Then Delim = "" >> AltVal = MM_typeArray(1) >> If (AltVal = "none") Then AltVal = "" >> EmptyVal = MM_typeArray(2) >> If (EmptyVal = "none") Then EmptyVal = "" >> If (FormVal = "") Then >> FormVal = EmptyVal >> Else >> If (AltVal <> "") Then >> FormVal = AltVal >> ElseIf (Delim = "'") Then ' escape quotes >> FormVal = "'" & Replace(FormVal,"'","''") & "'" >> Else >> FormVal = Delim + FormVal + Delim >> End If >> End If >> If (i <> LBound(MM_fields)) Then >> MM_UpdateQuery = MM_UpdateQuery & "," >> End If >> MM_UpdateQuery = MM_UpdateQuery & MM_columns(i) & " = " & FormVal >> Next >> MM_UpdateQuery = MM_UpdateQuery & ", DateStamp = '" & Now() & "' where " & MM_editColumn & " = " & MM_recordId>
' query string to execute MM_UpdateQuery = "" MM_EditQuery = "" ' *** Update Record: set variables MM_editConnection = MM_Receiver_STRING MM_editTable = "Data"and this is the code on line 221:
If (Not MM_abortEdit) Then ' execute the update Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_UpdateQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close