c# - Collect data and display the data in a column label -


how can sum column table without datagridview , i'm using sql command method , database in sql server 2008. this script

using system.data;      datatable dt = new datatable(); sqldataadapter sda = new sqldataadapter("select price pricelist", connection); sda.fill(dt); int sum=convert.toint32(dt.compute("sum(price)","")); label1.text=sum.tostring(); 

Comments

Popular posts from this blog

mysql - java.sql.SQLException Parameter index out of range (1 > number of parameters, which is 0) -

c - ALSA programming: how to stop immediately -