[Solved] How to send a limited amount of inserts at a time. C# System.Data.SQLite


I suppose that this question is now obsolete, since the homework is probably already past.

However, it is obvious from the code that the first time the transaction.Commit(); is called, the transaction will be completed. BUT there is no new transaction started in the loop, so the next time that transaction.Commit(); is called an error will occur because there will be no active transaction anymore!

Also, you have no code after the loop to handle any residual rows that were not an even divisible of 10. Even if the original loop code had worked, it could have left uncommitted rows that would not have been properly committed.

solved How to send a limited amount of inserts at a time. C# System.Data.SQLite