Il giorno mar, 23/03/2010 alle 04.38 -0700, hermann ha scritto:

> i looking for small sample how to access a sqlite db on sd-card.
> can anybody help with a small snipet ?

File sdcard = Environment.getExternalStorageDirectory();

File dbfile = sdcard.getAbsolutePath() + File.separator + "dbname.sql";

SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(dbfile, null);


it is a good practice to NOT put your DBs on the sdcard root, so please
create a directory for your software.

Bye.


-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

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

To unsubscribe from this group, send email to 
android-beginners+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to