peter wrote
Read this book
The Busy Coder's Guide to Android Development
By Mark L. Murphy
Chapter 25 Building a Content Provider
File sdcard = new File("/sdcard/application/mydb.sqlite" );
wescorp wrote:
> 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
-~----------~----~----~----~------~----~------~--~---