title: INSERT INTO - Missing semicolon (;) at end of SQL statement
body: <p>I am trying to insert the img source, which has just been upload, to the database with SQL INSERT INTO.</p>
  
  <p>This is the line in which I get the:</p>
  
  <blockquote>
    <p>"Missing semicolon (;) at end of SQL statement."</p>
  </blockquote>
  
  <p>Error.</p>
  
  <pre><code>command.CommandText = "INSERT INTO users (pic) VALUES (Images/"+fileName+") WHERE id="+theId;
  </code></pre>
  
  <p>This is the whole .aspx.cs file:</p>
  
  <pre><code>using System;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.IO;
  using System.Collections.Generic;  
  
  public partial class CS : System.Web.UI.Page
  {
  
    protected void Upload(object sender, EventArgs e)
    {
  
      if (FileUpload1.HasFile)
      {
          string fileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
          FileUpload1.PostedFile.SaveAs(Server.MapPath("~/Images/") + fileName);
  
          string theId = Request.Cookies["Logged"].Value;
          System.Data.OleDb.OleDbConnection connection = new System.Data.OleDb.OleDbConnection();
          connection.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Etay\Documents\Visual Studio 2012\WebSites\Josef\Shared\users.mdb";
          try
          {
              System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand();
              command.Connection = connection;
              connection.Open();
              command.CommandText = "INSERT INTO users (pic) VALUES (Images/"+fileName+") WHERE id="+theId;
              int rows = command.ExecuteNonQuery();
              Response.Redirect("~/signIn.cshtml");
          }
          finally
          {
              connection.Close();
          }
      }
    }
  }
  </code></pre>