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
unbreakable
Posts: 74
Registered: ‎12-17-2009
My Device: Z30
My Carrier: O2
Accepted Solution

SQL with weird returns

Hi,

I am trying to load Some sql data into my listview, purely on Qml. However, I keep getting back a blank page and when I use console.log(data), I get back a whole string of repeated [object Object], [object Object], [object Object]...

I am not sure why as my SQL query statement is working perfectly fine in SQLite Manager.

A quick search online suggest that it has something to do with the type of data being passed through but I am still not sure why.

(Am typing out my quote on my z30 because somehow my Internet doesn't work when I try to connect to my simulator :smileysad: will try to come back and edit my post later but I can't disconnect my simulator now )

My listview (which I think is working fine, calls on ListItemData.Title, ListItemData.Subtitle, ListItemData.SerialName.

I attached:

Group data model { Id: dataModel},
Data source {
Id: customdatasource
Type: datasourcetype.sql
Source : "sql/data.sql"
Query: " SELECT Title, Subtitle, Serial name FROM mytable ORDER BY codenumber"
On data loaded: {
Console.log ("Loaded Data") // does appear on console
DataModel.clear();
Datamodel.insertList(data);
Console.log(data) //producing the error code
}}


I know it looks messy but once again, am typing on mobile. Would appreciate some help!

Thanks!
Please use plain text.
Developer
unbreakable
Posts: 74
Registered: ‎12-17-2009
My Device: Z30
My Carrier: O2

Re: SQL with weird returns

Realised it was my paging problem. List was working well all along ... not sure if I am happy or not about that :smileytongue:

Pls close thread thanks!
Please use plain text.