[android-developers] Need Help on SQLITE ATTACH DATABASE COMMAND

2010-06-18 Thread Javastate
can someone provide a example about how to use db.execSQL() to write a attach database command. My add needs to copy some tables form old database into new one. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send

[android-developers] Help, When copy a table from attached database. new table lost primary key.

2010-06-18 Thread Javastate
I tried to copy a table from database1 into database2. with same table name. But the problem is new table in database2 lost its primary key. and sqlite seems not able to use Alter table to add new primary key. need help. here is how I did it: mDb.execSQL(DROP TABLE IF EXISTS image); //here I