I have been spending some time reading different best practices for databases and for SQLite specifically. While reading I found I was doing many things I shouldn\'t be doin
I didn't catch exactly what is the core problem, but if the problem is how to insert bulk insert statements in one transaction in so little time.
Here is a helper class I found earlier that could help you:
SQLiteBulkInsertHelper.cs
You can use it like this:
SQLiteBulkInsertHelper ContactBlk = new SQLiteBulkInsertHelper("","");
ContactBlk.AllowBulkInsert = true;
ContactBlk.AddParameter("", /*Column Data Type*/System.Data.DbType.Int64);
ContactBlk.AddParameter("", /*Column Data Type*/System.Data.DbType.String);
ContactBlk.Insert(new object[] {,});
ContactBlk.Flush();
Give it a try if you see it as a solution to your problem.
- 热议问题