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

Adobe AIR Development

Reply
Trusted Contributor
Posts: 202
Registered: ‎11-21-2010
My Device: 9700
My Carrier: Virgin Mobile
Accepted Solution

PlayBook and SQLite

Can someone please point me in right direction?  I'm looking for samle on building a WebWorks app for hte PlayBook using SQLite.  I cannot seem to find much info.  I'd like to bind a lixtbox control to a sql resultset.  Can someone please let me know where I'd find info on PlayBook/WebWorks/SQLite?  Thanks much.

 

 

Highlighted
Developer
Posts: 213
Registered: ‎10-02-2010
My Device: Z10 and Z30
My Carrier: Play and Plus

Re: PlayBook and SQLite

This is Adobe AIr forum, you should write in WebWorks one. This is my database which is working on Playbook:

 

https://github.com/ddluk/WebWorks-Database

 

Feel free to use it.

Trusted Contributor
Posts: 202
Registered: ‎11-21-2010
My Device: 9700
My Carrier: Virgin Mobile

Re: PlayBook and SQLite

That is fantastic, ddluk.  Thanks much.

Trusted Contributor
Posts: 202
Registered: ‎11-21-2010
My Device: 9700
My Carrier: Virgin Mobile

Re: PlayBook and SQLite

Hi ddluk.  Have you even noticed a sample of binding sql data to something like a listbox or drop down list?

 

So basically a loop that would populatre value/text of a drop down list from a select statement?

Developer
Posts: 213
Registered: ‎10-02-2010
My Device: Z10 and Z30
My Carrier: Play and Plus

Re: PlayBook and SQLite

Yes Smiley Wink To get value you can use something like that:

 

 

var data = document.getElementById("select_list").value;

db.transaction(function(bx){
bx.executeSql("UPDATE userdata1 SET value1 = ? WHERE key = ? ", [data, 1]);
}

 

 

To set value:

 

 

db.transaction(function (tx) {

tx.executeSql("SELECT value1 FROM userdata1 WHERE key = ?", [1], function (ax, results) {
document.getElementById("select_list").value = results.rows.item(0).value1;
                        }

 

 

Trusted Contributor
Posts: 202
Registered: ‎11-21-2010
My Device: 9700
My Carrier: Virgin Mobile

Re: PlayBook and SQLite

Thanks for the reply.  Really appreciate it.  Is this simillar to loading a listbox?  Is there somewhere specific I can look for info on accomplishing this type of thing?  Locading a dropdownlist, loading a list etc?

Very much appreciate all your feedback.  Thanks much.

 

Developer
Posts: 213
Registered: ‎10-02-2010
My Device: Z10 and Z30
My Carrier: Play and Plus

Re: PlayBook and SQLite

There should be many sample over the internet how to set dynamically listbox using javascript.