Let see if someone else helps you. I never used SQLiteOpenHelper, sorry... I just:
//Open connection Using (SqliteConnection sqlConnection = new SqliteConnection()) { // put the connection inside sqlilte // type of commannd = text sqliteConnection.CommandText = 'INSERT TABLE (Field1, Fiel2) VALUES (@Field1, @Field2)'; // while for 2000 records to insert // { sqliteConnection.Parameters.Clear(); sqliteConnection.Parameters.AddWithValue("@Field1", YourField1); sqliteConnection.Parameters.AddWithValue("@Field2", YourField2); sqliteConnection.ExecuteNoQuery(); // { } //Close Connection Or something like that, sorry for my ugly pseudocode but this runs ok on MonoTouch, MonoDroid, Windows Mobile, ASP.NET.... (except for the SqliteConnection object) Karl On 16/05/11 19:19, "milop" <mi...@slomins.com> wrote: >Hi, Karl. Thanks for the response. > >Here's the code. I've subclassed the Application class and have a >SQLiteOpenHelper object named DBHelper in it that I access for all DB >operations: > > foreach (DataRow row in ds.Tables[1].Rows) > { > var values = new ContentValues(); > values.Put("CountyCode", >Convert.ToInt32(row["Cnty"])); > values.Put("TransType", >Convert.ToString(row["TrnTyp"])); > values.Put("ResidentialTaxPct", >Convert.ToDouble(row["ResTax"])); > values.Put("CommercialTaxPct", >Convert.ToDouble(row["ComTax"])); > values.Put("ExemptUserTaxPct", >Convert.ToDouble(row["ExmTax"])); > >AppMain.getInstance().DBHelper.WritableDatabase.Insert("tblTax", null, >values); > } > > >-- >View this message in context: >http://mono-for-android.1047100.n5.nabble.com/Insert-2000-rows-into-SQLite >-tp4401830p4401854.html >Sent from the Mono for Android mailing list archive at Nabble.com. >_______________________________________________ >Monodroid mailing list >Monodroid@lists.ximian.com > >UNSUBSCRIBE INFORMATION: >http://lists.ximian.com/mailman/listinfo/monodroid _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid