title: Update MySQL field wilth NULL from web form
body: <p>I have a form on an (classic) ASP webpage which I want to use to remove the data held in a records field. The field itself has NULL as default.</p>
  
  <p>I have tried a couple of ways to to do this. If I use <code>&lt;input value=""&gt;</code>, it inserts a blank. If I use <code>&lt;input value="NULL"&gt;</code>, it inserts the word NULL but this is not a <em>NULL</em> value.</p>
  
  <p>Any ideas?</p>
  
  <p>The SQL (from Dreamweaver):</p>
  
  <pre class="lang-vbs prettyprint-override"><code>&lt;%
  If (CStr(Request("MM_update")) = "deleteImage") Then
    If (Not MM_abortEdit) Then
      ' execute the update
      Dim MM_editCmd
  
      Set MM_editCmd = Server.CreateObject ("ADODB.Command")
      MM_editCmd.ActiveConnection = MM_ENG_STRING
      MM_editCmd.CommandText = "UPDATE tblContent SET ContentImage = ?, ContentImageCaption = ? WHERE ContentID = ?" 
      MM_editCmd.Prepared = true
      MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("ContentImage")) ' adVarWChar
      MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 105, Request.Form("ContentImageCaption")) ' adVarWChar
      MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 5, 1, -1, MM_IIF(Request.Form("MM_recordId"), Request.Form("MM_recordId"), null)) ' adDouble
      MM_editCmd.Execute
      MM_editCmd.ActiveConnection.Close
  
      ' append the query string to the redirect URL
      Dim MM_editRedirectUrl
      MM_editRedirectUrl = "delete-images-updated.asp"
      If (Request.QueryString &lt;&gt; "") Then
        If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
          MM_editRedirectUrl = MM_editRedirectUrl &amp; "?" &amp; Request.QueryString
        Else
          MM_editRedirectUrl = MM_editRedirectUrl &amp; "&amp;" &amp; Request.QueryString
        End If
      End If
      Response.Redirect(MM_editRedirectUrl)
    End If
  End If
  %&gt;
  </code></pre>
  
  <p>and the form:</p>
  
  <pre class="lang-vbs prettyprint-override"><code>&lt;form ACTION="&lt;%=MM_editAction%&gt;" METHOD="POST" name="deleteImage" id="deleteImage"&gt;
  &lt;input name="ContentID" type="hidden" 
   value="&lt;%=(rsContent.Fields.Item("ContentID").Value)%&gt;"&gt;
  &lt;input name="ContentImage" type="hidden" value=""&gt;
  &lt;input name="ContentImageCaption" type="hidden" value=""&gt;
  &lt;h3&gt;Are you sure you want to delete this image?&lt;/h3&gt;
  &lt;input type="submit" class="submitButton" value="Yes! Delete Image"&gt;
  &lt;input type="reset" class="resetButton" 
   value="No. Cancel Delete" onClick="javascript:history.go(-1)"&gt;
  &lt;input type="hidden" name="MM_update" value="deleteImage"&gt;
  &lt;input type="hidden" name="MM_recordId" 
   value="&lt;%= rsContent.Fields.Item("ContentID").Value %&gt;"&gt;
  &lt;/form&gt;
  </code></pre>