Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 66
Registered: ‎08-05-2009
My Device: Bold 9930/Playbook
My Carrier: Verizon
Accepted Solution

db is not a supported asset file

[ Edited ]
source: "asset:///sql/mileage.db"

 The line above is throwing the warning: "assett:///sql/mileage.db" is not a supported asset file.  I can supply more code if needed.  I'm new to cascades development and at the moment just working on a proof of concept app for myself.  Thanks in advance!

 

Also, not sure if it matters or not, but this is within a tabbed pane.  Do I need a list view in the tabbed pane?

 

Developer
Posts: 222
Registered: ‎11-05-2011
My Device: Z10
My Carrier: Beeline

Re: db is not a supported asset file

show plz more code. And question: you really save your DB file to assets/sql/ folder?

Developer
Posts: 180
Registered: ‎12-09-2011
My Device: 9360, BB10
My Carrier: Aircel

Re: db is not a supported asset file

Please go through this link if you want to deal with the database in your app...

 

https://developer.blackberry.com/cascades/documentation/ui/lists/lists_create_database_class.html

Developer
Posts: 222
Registered: ‎11-05-2011
My Device: Z10
My Carrier: Beeline

Re: db is not a supported asset file

Also you can only read if you use SQL in assets folder (if you want to update SQL or etc, you need to copy your SQL file into data directory for manipulating (in data directory you have read and write permissions)
Developer
Posts: 222
Registered: ‎11-05-2011
My Device: Z10
My Carrier: Beeline

Re: db is not a supported asset file

OK, download that example from github and copy .db file from SQL folder to your project SQL folder
Developer
Posts: 222
Registered: ‎11-05-2011
My Device: Z10
My Carrier: Beeline

Re: db is not a supported asset file

also Cascades SDK error tips isn't 100% true))) some tips is bug)))
Developer
Posts: 16,987
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: db is not a supported asset file

you can ignore this error, it should be a warning instead.
Having a db file in the assets folder is fine as long as you don't intend to write into or modify it, as the assets folder has read-only access for your app.

as stated above you could move the db to the data folder (outside of assets) to have a writeable copy. Or you could create it there in the first place and don't have a db file in your app initially.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 66
Registered: ‎08-05-2009
My Device: Bold 9930/Playbook
My Carrier: Verizon

Re: db is not a supported asset file

Not sure how I missed this tutorial, but I believe it has what I needed.  Will post back if I have additional issues.  Thanks everyone!