title: C# SqlDataAdapter turns all values in Column of Decimal to zero
body: <p>I am using SqlDataAdapter to fill a DataSet from a SQLServer table. All of the columns are filled properly except the Transaction column which is a Decimal type in the database. These values all become 0.0.</p>
  
  <p>The code: </p>
  
  <pre><code>using (SqlConnection dbconn = new SqlConnection (connection_string)) {
              SqlDataAdapter adapter = new SqlDataAdapter (query, dbconn);
              exposureSequence = new DataSet ();
              adapter.Fill (exposureSequence, "ExposureSequence");
          }
  </code></pre>
  
  <p>This code </p>
  
  <pre><code>            foreach(DataRow r in exposureSequence.Tables["ExposureSequence"].Rows){
              Console.WriteLine(r["TransactionAmount"] + ", ");
          }
  </code></pre>
  
  <p>prints</p>
  
  <pre><code>0.0000, 
  0.0000, 
  0.0000,
  ...
  </code></pre>
  
  <p>But if I do this:</p>
  
  <pre><code>using (IDataReader reader = dbcmd.ExecuteReader()) {
                      while(reader.Read()){
                          //int ActionClientID = (int) reader["ActionClientID"];
                          Decimal TransactionAmount = (Decimal) reader["TransactionAmount"];
                          Console.WriteLine(TransactionAmount);
                      }
  </code></pre>
  
  <p>My output is: </p>
  
  <pre><code>164.4950
  164.4950
  164.4950
  ...
  </code></pre>
  
  <p>Why is adapter.Fill turning the TransactionAmount values to 0.000?</p>