title: escaping special character from string asp and ms access query
body: <p>I have ASP code with MS Access and I am updating my records. While updating when I put special characters like single quotes(')  in string it displays an error. When string is without special chars it works correctly.</p>
  
  <p>Please help or give any solution. Here is my code.</p>
  
  <pre><code>&lt;!--#INCLUDE FILE="ConnStr.asp"--&gt;
  dim fileTitle
  dim fileDescription
  dim fromDateX
  dim toDateX
  dim romTimeX
  dim toTimeX
  dim Location
  dim LocationURL
  dim FileID
  
  
   fileTitle= request("fileTitle")
   fileDescription= request("description")
   fromDateX= request("fdate")
   toDateX= request("tdate")
   romTimeX= request("ftime")
   toTimeX= request("ttime")
   Location= request("location")
   LocationURL= request("locationurl")
   FileID= request("jID")
  
  
  sql = "Update tblFileInfo Set sFDate='" &amp; fromDateX &amp; "',sTDate='" &amp; toDateX &amp; "', sFTime='" &amp; romTimeX &amp; "',sTTime='" &amp; toTimeX &amp; "',location='" &amp; Location &amp; "', locationURL='" &amp; LocationURL &amp; "', filetitle='" &amp; fileTitle &amp; "', description='" &amp; fileDescription &amp; "' Where ID=" &amp; FileID
  
      objConn.Execute(sql)
      Response.Redirect("adminfiles.asp?msg=save")
  </code></pre>