how to sum two argument with executereader
string connstr = @"Server=.\SQLEXPRESS ;Initial Catalog=ABJDATABASE;Integrated Security=True; Max Pool Size=100";
string query = "SELECT SUM(txtWeight,txtPriceItem) AS txtWeight,txtPriceItem FROM personalData";
SqlConnection conn = new SqlConnection(connstr);
conn.Open();
SqlCommand myCommand = new SqlCommand(query, conn);
SqlDataReader myReader = null;
myReader = myCommand.ExecuteReader();
while (myReader.Read())
{
txtTotalWeight.AppendText(myReader["txtWeight"].ToString());
txtTotalPrice.AppendText(myReader["txtPriceItem"].ToString());
}
conn.Close();
error shown
the sum function require one argument