I develop a UWP app and I insert 5 rows per second in a SQLite table. When the index of the table reaches 2000 the applications crashes.( exited with code -1073740791 (0xc0000409).)
Any ideas why and how can i fix this?
using (SqliteConnection db = new SqliteConnection("Filename = TTsqlite.db"))
{
db.Open();
SqliteCommand insertCommand = new SqliteCommand();
insertCommand.Connection = db;
//Use parameterized query to prevent SQL injection attacks
insertCommand.CommandText = "INSERT INTO MyTable VALUES (@Entry,@Entry2);";
insertCommand.Parameters.AddWithValue("@Entry", tb.Text);
insertCommand.Parameters.AddWithValue("@Entry2", DateTime.Now.ToString());
try
{
insertCommand.ExecuteReader();
}
catch (SqliteException error)
{
//Handle error
return;
}
db.Close();
User contributions licensed under CC BY-SA 3.0