I am trying to insert some csv style file.txt content to a local SQLite
dataBase, I handle file reading, content process and get some strings:
INSERT OR REPLACE INTO mytab (id,name,adress) VALUES(1,john,adress1)
INSERT OR REPLACE INTO mytab (id,name,adress) VALUES(2,marry,adress2)
INSERT OR REPLACE INTO mytab (id,name,adress) VALUES(3,lama,ruadress3)
//...
Now I want to open an sqlite transaction, do all this inserts and then to close transaction. I am using SQLite.Net-PCL
and SQLite for Universal App Platform
, how can I do that?
I tryed to open a connection like this:
var sqlpath = Path.Combine(ApplicationData.Current.LocalFolder.Path, "Mydb.sqlite");
SQLiteConnection conn = new SQLiteConnection(new SQLitePlatformWinRT(), sqlpath);
//I'am trying to open transaction - but get ERROR -> SQLiteCommand does not contain contstructor that takes 2 arguments
SQLiteCommand cmd = new SQLiteCommand("BEGIN", conn);