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

Web and WebWorks Development

Posts: 13
Registered: ‎01-21-2013
My Device: BB 10
My Carrier: -
Accepted Solution

Read an external .sqlite file in WebWorks



I'm developing an application for BB10; I have a .sqlite file generated by a software and I want to make some queries on it.



I've read that I can't rely on the HTML5 Database because it doesn't allows you to operate on an arbitrary .sqlite file, but only on the ones integrated in webworks.  Is that correct?


Is there any way to read data from my .sqlite file in WebWorks ?


Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Read an external .sqlite file in WebWorks

Yes, this is not a WebWorks restriction so much as a security restriction itself imposed by Browser based environments. The webview will not allow you to load an arbritray sqlite. Or at least AFAIK.


Simplest method may be to do the following:


1. Bundle or load the database as a database drop of SQL commands.

2. Loop over the loaded file and execute the commands against the WebSQLite database inserting and creating all tables that you need at load/runtime.

3. Execute any queries that you would like to have to get at your data.