I am using sqlite in monodroid - I am doing a bulk insert from an external
source
I have read there is no inbuilt way of importing a whole xml file into the
sqlite database
But one can optimise a loop which inserts line by line by using
connection.BeginTransation()
Which is supposed to delay the commit until the loop is over then use
setTransationSuccessful()
However in the monodroid library mono.data.sqlite.dll does not seem to
contain the 'setTransactionSuccessful' method
Nor themethod endTransation())
Given the insert loop below can anyone tell me if I am barking up the wrong
tree trying to stall the committing of inserts in this way? Is there any
other way to speed up a large insert loop like this?
If there is a method in Mono.Data.Sqlite for 'begintransaction()' where is
the obverse 'endtransation' or 'settransationsuccessful()'
As you can see from code below I have also tried various forms of commit.
//==================================
// connection.BeginTransaction();
// connection is a straightforward sqlite connection the above code line is
available in monodroid
// however without some commit or endtransation nothing gets written to the
database
for (int go = 0; go < selstr2.Count; go++)
{
//cc2 is the connection.command
cc2.CommandText = selstr2[go]; //array selstr
contains insert statements
cc2.ExecuteNonQuery();
}
//connection.setTransationSuccessful();
//cc2.Transaction.Commit();
connection.Close();
//===========================================
I'd be grateful for any help at all -
John Murray
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid