[android-developers] Re: Drop entire database?

2009-05-04 Thread mr.waide...@gmail.com
You have to think that the database is just a file in DDMS, so just call delete function passing directory as arg. On 6 abr, 16:22, gudujarlson wrote: > Thank you, Sirius, but my question was how to drop the entire > database, not just one table. --~--~-~--~~~---~--~

[android-developers] Re: Drop entire database?

2009-04-06 Thread gudujarlson
Thank you, Sirius, but my question was how to drop the entire database, not just one table. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-devel

[android-developers] Re: Drop entire database?

2009-04-01 Thread sirius
Hi, You can drop the table by writing DROP TABLE tablename IF EXISTS But after that it is good to do a VACUUM (info about that in the link below). I.e the code might look like: private SQLiteDatabase db; private static final String TABLE_NAME = "name_of_table"; try{db.execSQL("DROP TABLE

[android-developers] Re: Drop entire database?

2009-03-25 Thread gudujarlson
> The Context class has a suite of functions for creating, opening, and > deleting databases at the standard location of databases for your app. > > The SQLiteDatabase class can be used to access a databases at any absolute > path. In that case, you are using an absolute path, so use File to dele

[android-developers] Re: Drop entire database?

2009-03-25 Thread Dianne Hackborn
On Tue, Mar 24, 2009 at 10:53 PM, gudujarlson wrote: > The context class is not where I would expect to find the function to > delete a SQLite database. Wouldn't it be more intuitive to have this > function on the SQLiteDatabase class? The Context class has a suite of functions for creating, op

[android-developers] Re: Drop entire database?

2009-03-24 Thread gudujarlson
I found the answer to my own question. http://developer.android.com/reference/android/content/Context.html#deleteDatabase(java.lang.String) The context class is not where I would expect to find the function to delete a SQLite database. Wouldn't it be more intuitive to have this function on the S