title: No exception, but my data isn't written into the SQL Server database
body: <p>I'm stuck at a loose end with inserting a new data entry into a SQL Server database. I have all the info I want to store in the following class:</p>
  <pre><code>public class NewSearchQuery //object reference q
  {
      public string Name, Location, SearchType, Path, Method;
      public int RefNum;
      public double Fee;
      public bool Paid;
  }
  </code></pre>
  <p>and after the user has filled in the form etc.. this is my code to save the info to the database:</p>
  <pre><code>        bool complete;
          string sql = $&quot;Insert into PrivateLog (Id,Applicant,ApplicationDate,Location,Search,Paid,Method,Amount,Files) values({q.RefNum}, '{q.Name}', {AppDate}, '{q.Location}', '{q.SearchType}', {q.Paid}, '{q.Method}', {q.Fee}, '{q.Path}')&quot;;
          cnn.Open();
          try
          {
              SqlDataAdapter adapter = new SqlDataAdapter();
              SqlCommand command = new SqlCommand(sql, cnn); //The Connection String cnn is in a public string variable above this method. 
              adapter.InsertCommand = new SqlCommand(sql, cnn);
              command.Dispose();
              complete = true;
          }
          catch (System.Exception e)
          {
              complete = false;
          }
          cnn.Close();
          return complete;
  </code></pre>
  <p>Here is what my table designer looks like:</p>
  <p><a href="https://i.stack.imgur.com/aj1b1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aj1b1.png" alt="enter image description here" /></a></p>
  <p>Can anyone show me why the new data entry might not be going through?</p>