Hi group

I am new to developing programs to the  Android framework.

I've read the sample exercises (http://developer.android.com/guide/
tutorials/notepad/notepad-ex1.html) but have a question regarding
their database creating.

All database creation happens in the function ["onCreate()" -
NotesDbAdapter.java ln 67].

As I read the code, the create statement is run without checking that
the DB exists.
What if the db exists already? How ofthe is the function run? ... It
doest override a method, but the class does not extend any class and
thus does not inherint any functions to override?

I've seen some work-arounds on the internet:
To include a "IF NOT EXISTS"-statement in the SQL
or
Just check that the DB exists before querying it. If not, create it.

Both seem very clumsy. Is there no way to setup a db at install time?

Best regards and thanks in advance
Frederik

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to