Share SQLite database between 2 android apps?

I need to share a single database between 2 apps. I know that the database will be created on /data/data/MY_PACKAGE/databases/ . Since the packages names are different is it possible to define the path to one package name when I create the database on either app? Thanks. Answer UPDATE: The method described below relies on … Read more

Python and SQLite: insert into table

I have a list that has 3 rows each representing a table row: >>> print list [laks,444,M] [kam,445,M] [kam,445,M] How to insert this list into a table? My table structure is: tablename(name varchar[100], age int, sex char[1]) Or should I use something other than list? Here is the actual code part: for record in self.server: … Read more

SQLite autoincrement – How to insert values?

I generate a SQLite table (in java): create table participants (ROWID INTEGER PRIMARY KEY AUTOINCREMENT, col1,col2); afterwards I try to add rows using the INSERT comand: insert into participants values (“bla”,”blub”); i get the error: java.sql.SQLException: table participants has 3 columns but 2 values were supplied I thought the row id would be generated automatically, … Read more

sqlite select with condition on date

I have an sqlite table with Date of Birth. I would like to execute a query to select those records where the age is more than 30. I have tried the following but it doesn’t work: select * from mytable where dob > ‘1/Jan/1980’ select * from mytable where dob > ‘1980-01-01’ Answer Some thing … Read more