I vaguely recall that the SQLiteOpenHelper is just for DBs that are
installed in the default directory for your application. (Remember when you
used it in the default location you just say "my.db" to open it not
"/data/data/myapp/databases/my.db").
Ludwig
2008/10/29 wescorp <[EMAIL PROTECTED]>
>
> Hello,
>
> I need to be able to work with databases on the sdcard.
>
> I've been using the following code snippet from the NotePad
> application and works perfectly on the emulator without using the
> sdcard.
>
> private static class DatabaseHelper extends SQLiteOpenHelper {
> DatabaseHelper(Context context) {
> super(context, "mydb.sqlite", null, 2);
> }
>
> When I include the path to the db as
> "/sdcard/application/mydb.sqlite"
>
> the following error occurs
> 10-29 09:57:04.798: ERROR/AndroidRuntime(200): Caused by:
> java.lang.IllegalArgumentException: File /sdcard/application/
> mydb.sqlite contains a path separator
>
> The sdcard is properly emulated.
> The path exists.
>
> I've looked around but no obvious solution to me.
>
> Any help greatly appreciated.
>
> Cheers,
> Wes
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---