我想在标签中显示我的sqlite列的总和。
我想到的是label7.Text = DT.Columns[6].ToString();
但这只是给我列名。
namespace SQLiteForm
{
public partial class Form1 : Form
{
private SQLiteConnection sql_con;
private SQLiteCommand sql_cmd;
private SQLiteDataAdapter DB;
private DataSet DS = new DataSet();
private DataTable DT = new DataTable();
private string id; public Form1()
{
InitializeComponent();
}
private void setConnection()
{
sql_con = newQLiteConnection("Dataource=formdb.db;Version=3;New=False;Compress=True");
}
预期结果,在标签中显示总和。