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

New Developer
Posts: 16
Registered: ‎12-16-2010
My Device: Not Specified

result of select statement in qml

[ Edited ]

How can I get into a variable the result of a select in QML ?


print is a function I use to print

name is a column in the table


first try

 var result  =dataSource.execute("SELECT * FROM table ",0)

var list = result .values()






  doesn't work

 [undefined] is not an object.


second try


    property variant listData;



listData  =dataSource.execute("SELECT * FROM table",0)

var list = listData .values()





same error  [undefined]listData  is not an object.



  the  sql query seems to be succesfull

For example

listData  =dataSource.execute("SELECT * FROM table",0)

dataModel.insert(listData );

inserts  rows in the table with the correct values

but if i try to get somehow the  values from listData  it just down't work

How could I do that ?