title: C# - Insert null into SQL Compact Edition table
body: <p>Iam trying to insert some data into a SQL Compact Edition table using parameter. My table allows null to be inserted but when I run my code below I can not get it working because one of these paramerters is going to be null sometimes and I would like to insert null into that column when the paramerter is null.</p>
  
  <p>What how can I fix this?</p>
  
  <pre><code>string strConn = Properties.Settings.Default.SqlConnectionString;
  
  
          using (SqlCeConnection conn = new SqlCeConnection(strConn))
          {
              conn.Open();
              using (SqlCeCommand cmd = new SqlCeCommand("insert into table(ID, Name, Adress) values (@parm1, @parm2, @param3)", conn))
              {
                  cmd.Parameters.AddWithValue("@parm1", ID);
                  cmd.Parameters.AddWithValue("@parm2", Name);
                  cmd.Parameters.AddWithValue("@parm3", Adress);
  
                  cmd.ExecuteNonQuery();
              }
          }
  </code></pre>