Also, I doubt that you can use a file:/// URL to open a database.

On Thu, Dec 16, 2010 at 8:19 AM, Mark Murphy <[email protected]> wrote:
> You cannot modify application assets at runtime, as they are part of
> the digitally signed APK. You would need to copy that file out
> somewhere else and modify it there.
>
> On Thu, Dec 16, 2010 at 7:53 AM, cuil yahoo <[email protected]> wrote:
>> Hello,
>>
>> I am trying to use a database to store a huge text in it serially(using a
>> primary key, for easy searching).
>>
>> I have already done the following things,
>>
>> 1. Created a SQLite database(named database) using the SQLite Database
>> Browser, and have imported that to my assets folder in Eclipse. The database
>> has two fields one _id(primarykey) and saveme(the text field).
>>
>> 2. Now, i want to write stuff in this database, however when i try to open
>> the database using the code below, i get a SQLite Code 14 type of an error(
>> which on a google result showed up error on opening of database).
>>
>> SQLiteDatabase writedatabase = null;
>> writedatabase.openDatabase("file:///android_asset/database",null,0);
>> writedatabase.execSQL("INSERT INTO " + "database" + " Values ('1',
>> 'first')");
>>
>>
>> It would be really very helpful, if someone could please point the error in
>> the steps.
>>
>> Thanks.
>>
>> Cuil
>>
>>
>>
>> --
>> 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
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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