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

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -