I'm using this code:
我用这段代码:
SqlConnection con = new SqlConnection(@"Data Source=(local);Initial
Catalog=dbsoft;Integrated Security=True");
con.Open();
SqlCommand cmd = new SqlCommand("SELECT SUM(price) FROM fiscal");
cmd.Connection = con;
int sum = cmd.ExecuteScalar();
label3.Text = sum.ToString();
con.Close();
SqlConnection