Is it possible to insert multiple rows at a time in an SQLite database?

In MySQL you can insert multiple rows like this: INSERT INTO ‘tablename’ (‘column1’, ‘column2’) VALUES (‘data1’, ‘data2’), (‘data1’, ‘data2’), (‘data1’, ‘data2’), (‘data1’, ‘data2’); However, I am getting an error when I try to do something like this. Is it possible to insert multiple rows at a time in an SQLite database? What is the syntax … Read more

How can I avoid concurrency problems when using SQLite on Android?

What would be considered the best practices when executing queries on an SQLite database within an Android app? Is it safe to run inserts, deletes and select queries from an AsyncTask’s doInBackground? Or should I use the UI Thread? I suppose that database queries can be “heavy” and should not use the UI thread as … Read more

Improve INSERT-per-second performance of SQLite

Optimizing SQLite is tricky. Bulk-insert performance of a C application can vary from 85 inserts per second to over 96,000 inserts per second! Background: We are using SQLite as part of a desktop application. We have large amounts of configuration data stored in XML files that are parsed and loaded into an SQLite database for … Read more

java.lang.ClassNotFoundException: org.sqlite.JDBC error in Sample.java program from xerial

Thanks to user phew for the help/ideas. I missed the obvious command line instructions on Xerial’s site for the Sample program. To get the program to run from the command line, I had to copy the JAR file into the same folder as the .CLASS file. Then run the following command: java -classpath “.:sqlite-jdbc-(VERSION).jar” Sample … Read more