title: How to set Access column value to 0 (default) on a new created DB column? C#
body: <p>So I have read multiple posts about my question but I cant find the right solution for it. </p>
  
  <p>I've got a form in which a user can add a custom column to a database. This column is always of type currency with the currency type of Euro. </p>
  
  <p>I thought I did the trick by creating this query: </p>
  
  <pre><code>string query = "ALTER TABLE Uitgaven ADD COLUMN [" + textBox16.Text + "] MONEY DEFAULT 0";
  
                      command.CommandText = query;
                      command.ExecuteNonQuery();
  </code></pre>
  
  <p>At my initialize I have a functions that add my database values to a listbox with a reader, it also transforms the read values to the right output, see here the code for it:</p>
  
  <pre><code> while (reader2.Read())
                  {                                               
                      for (int i = 0; i &lt; reader2.FieldCount; i++)
                      {
                          y = reader2.GetName(i).Length;
                          if (reader2.GetName(i) != "Maand" &amp;&amp; reader2.GetName(i) != "Uitgaven Id")
                          {
                              euro_display = (decimal)(reader2.GetValue(i));
                              ListBox2_add.Items.Add(reader2.GetName(i) + "€".PadLeft(31 - y) + euro_display.ToString("0.00", CultureInfo.CreateSpecificCulture("nl-NL")));
                              comboBox1.Items.Add(reader2.GetName(i));
                              totaal_uitgaven += reader2.GetDecimal(i);
                          }
                      }
                  }
  </code></pre>
  
  <p>This above function however isn't working when someone adds a custom field with my first query code. This above function needs a value in the database and for some reason the query code in the beginning of my code isn't setting the new added column values to the default 0 (0,00 euro). </p>
  
  <p>I try'd multiple things but non of them see to do the trick.</p>
  
  <p>I modified my query to (among others):</p>
  
  <pre><code>string query = "ALTER TABLE Uitgaven ADD COLUMN [" + textBox16.Text + "] MONEY DEFAULT 0 NOT NULL";
  
  string query = "ALTER TABLE Uitgaven ADD COLUMN [" + textBox16.Text + "] Y DEFAULT 0 NOT NULL"; `
  </code></pre>
  
  <p>(read somewhere that Y was the currency for Euro--not sure tough)</p>
  
  <p>I also try'd to add a second query after my first query to set its value of the created column: </p>
  
  <pre><code>string query2 = "ALTER TABLE Uitgaven ADD DEFAULT 0 FOR [" + textBox16.Text + "]";
  
  string query2 = "INSERT INTO Uitgaven ([" + textBox16.Text + "] ) VALUES (0)"; 
  </code></pre>
  
  <p>This all didn't work though.. Anyone has a clue how I can set the values of a custom created column to a default 0 or just to 0 (currency - euro)?</p>
  
  <p>Thanks in advance!</p>