阅读背景:

使用float(c#)对sql列进行求和

来源:互联网 

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 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: