title: Update table column with the columns default value
body: <pre><code>System.Data.SqlClient.SqlConnection dataConnection = new SqlConnection();
  dataConnection.ConnectionString = ConfigurationManager.ConnectionStrings["DBConnectionString"].ConnectionString;
  
  System.Data.SqlClient.SqlCommand dataCommand = new SqlCommand();
  dataCommand.Connection = dataConnection;
  
  long MachineGroupID = Convert.ToInt64(Request.QueryString["node"]);
  dataCommand.CommandText = "UPDATE [MachineGroups] SET [MachineGroupName]=@MachineGroupName,[MachineGroupDesc]=@MachineGroupDesc WHERE [MachineGroupID]= @MachineGroupID";
  
  //add our parameters to our command object  
  dataCommand.Parameters.AddWithValue("@MachineGroupName", MachineGroupName);
  dataCommand.Parameters.AddWithValue("@MachineGroupDesc", MachineGroupDesc);
  
  dataCommand.Parameters.AddWithValue("@MachineGroupID", MachineGroupID);
  
  dataConnection.Open();
  dataCommand.ExecuteNonQuery();
  dataConnection.Close();
  </code></pre>
  
  <p>here the MachineGroups table has a column "tval" which was first inserted with user value and then on updating it should put the default value set by the SQl value when created...</p>
  
  <p>for example </p>
  
  <pre><code>[tval] [int] NOT NULL DEFAULT ((2147483647))
  </code></pre>
  
  <p>this is how the column was created, and now i want to put the value 2147483647 on updating.</p>
  
  <p>also i cannot fix the value as "2147483647" coz that might change..</p>
  
  <p>any suggestions??</p>
  
  <p>thanks</p>