private void button1_Click(object sender, EventArgs e)
{
WriteToTable();
}
public void WriteToTable()
{
string DBpath = @"Data Source=.\StudentInfoDB.db;Version=3;";
using SQLiteConnection SQLConnection = new SQLiteConnection(DBpath);
using var cmd = new SQLiteCommand(DBpath, SQLConnection);
SQLConnection.Open();
cmd.CommandText = "INSERT INTO Students (Name) VALUES ('Test')";
cmd.ExecuteNonQuery();
SQLConnection.Close();
}
private void button1_Click(object sender, EventArgs e)
{
WriteToTable();
}
public void WriteToTable()
{
string DBpath = @"Data Source=.\StudentInfoDB.db;Version=3;";
using SQLiteConnection SQLConnection = new SQLiteConnection(DBpath);
using var cmd = new SQLiteCommand(DBpath, SQLConnection);
SQLConnection.Open();
cmd.CommandText = "INSERT INTO Students (Name) VALUES ('Test')";
cmd.ExecuteNonQuery();
SQLConnection.Close();
}