private void button3_Click(object sender, EventArgs e)
{
command = "SELECT COUNT(*) FROM clients;";
SQLiteCommand com1 = new SQLiteCommand(command,connection);
connection.Open();
count = com1.ExecuteNonQuery();
connection.Close();
MessageBox.Show(Convert.ToString(count));
}
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command.When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of rows affected by the trigger or triggers.For all other types of statements, the return value is -1.If a rollback occurs, the return value is also -1.