title: Error Converting data type 'Numeric' to Decimal (help!)
body: <p>Good Day Everyone, </p>
  
  <p>As of now im stuck with this error</p>
  
  <pre><code>Error Converting data type 'Numeric' to Decimal
  </code></pre>
  
  <p>this is my code</p>
  
  <pre><code>AddManualItems AddReconItem = new AddManualItems();
          UserAccess user = new UserAccess();
          AddReconItem.BranchCode = BranchCodeTextBox.Text;
          AddReconItem.ForLoanMonth = YearDropDownList.SelectedValue + "/" + MonthDropDownList.SelectedValue;
          AddReconItem.ItemWeight = Convert.ToDecimal(WeightTextBox.Text);     
          AddReconItem.PrincipalAmount = Convert.ToDecimal(PrincipalTexAmTextBox.Text);
          AddReconItem.PawnTicket = PwnTicketTextBox.Text;
          AddReconItem.ItemStorageGroup = Convert.ToInt16(StorageNameDropDownList.SelectedValue);
          AddReconItem.ReconID = Convert.ToInt16(ReconTypeDropDownList.SelectedValue);
          user.UserID = Session["UserID"].ToString();
  
          string a = servs.AddItemRecon(user, AddReconItem); // this is where the error appears in debug mode
  </code></pre>
  
  <p>the code inside of the ADDitemRecon(User,AddReconItem) is this</p>
  
  <pre><code> using (SqlConnection reportsConn = new SqlConnection(sqlConnWriter))
              {
                  reportsConn.Open();
                  SqlCommand AddReconItem = new SqlCommand();
                  AddReconItem.Connection = reportsConn;
                  AddReconItem.CommandType = CommandType.StoredProcedure;
                  AddReconItem.CommandText = "Updater.usp_AddReconcileItems";
                  AddReconItem.Parameters.AddWithValue("@ITEMWEIGHT", Convert.ToDecimal( items.ItemWeight));
                  AddReconItem.Parameters.AddWithValue("@ITEMPRINCIPALAMT", Convert.ToDecimal(items.PrincipalAmount));
                  AddReconItem.Parameters.AddWithValue("@FORLOANMONTH", Convert.ToDateTime(items.ForLoanMonth));
                  AddReconItem.Parameters.AddWithValue("@STORAGEGROUPID", items.ItemStorageGroup);
                  AddReconItem.Parameters.AddWithValue("@BRANCHCODE", items.BranchCode);
                  AddReconItem.Parameters.AddWithValue("RECONID", items.ReconID);
                  AddReconItem.Parameters.AddWithValue("@PAWNTIX",items.PawnTicket);
                  AddReconItem.Parameters.AddWithValue("@CREATEDBY", user.UserID.ToString());
                  AddReconItem.ExecuteNonQuery();
              }
  </code></pre>
  
  <p>my property for ItemWeight is </p>
  
  <pre><code> private decimal itemWeight;
  
      public decimal ItemWeight
      {
          get { return itemWeight; }
          set { itemWeight = value; }
      }
  </code></pre>
  
  <p>i bet the error is in the item weight because when i input in the item weight
  12345.12 it works fine, but when i input 1234 instead of treating it as 1234.00 it treats it as 1234 only making it numeric.. </p>
  
  <p>any help? i do not know if my conversions are wrong </p>
  
  <p>By the way my field in database is </p>
  
  <pre><code>fld_ItemWeight (decimal (38,6), not null
  </code></pre>
  
  <p>EDIT**
  Is there any bugs known in Decimal?? im using VS 2005 as of now.</p>