my intention:

   1. Create a database
   
android.database.sqlite.SQLiteOpenHelper.getWritableDatabase<http://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html#getWritableDatabase%28%29>
   ()
   2. Create tables and insert rows.
   
android.database.sqlite.SQLiteDatabase.execSQL<http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#execSQL%28java.lang.String,%20java.lang.Object%5B%5D%29>("CREATE
   TABLE ...")
   3. User decides to start from fresh.
   Drop all the data, table etc and start from step 1.


I don't see any SDK API to do step (3).

Kumar    _/|\_
www.saisk.com
[email protected]
"making a profound difference with knowledge and creativity..."


On Tue, Jul 14, 2009 at 4:20 PM, Macarse <[email protected]> wrote:

>
> On Tue, Jul 14, 2009 at 6:17 PM, Mark Murphy<[email protected]>
> wrote:
> >
> > Kumaravel Kandasami wrote:
> >>  How to drop a database in Android SDK?
> >
> > AFAIK, you don't drop a database. At most, you delete its file.
> >
> > --
> > Mark Murphy (a Commons Guy)
> > http://commonsware.com | http://twitter.com/commonsguy
> >
> > Warescription: Three Android Books, Plus Updates, $35/Year
> >
> > >
> >
>
> Never did it with android.
> But with sqlite goes like this:
>
> sqlite> create table a(int a);
> sqlite> insert into a values (1);
> sqlite> insert into a values (2);
> sqlite> insert into a values (3);
> sqlite> select count(*) from a;
> 3
> sqlite> delete from a;
> sqlite> select count(*) from a;
> 0
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to