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: 63
Registered: ‎11-12-2012
My Device: BB10 DevAlpha
Accepted Solution

CustomSqlDataSource in Cascades.

I'm trying implement CustomSqlDataSource from the quotes sample application. I tried copying the the customsqldatasource.cpp and customsqldatasource.h into the src folder but the customsqldatasource.cpp is throwing a lot of errors 

 mSqlConnector = new SqlConnection(mSourceInDataFolder, "connect");

all of them are related to bb::data

undefined reference to `bb::data::SqlConnection::SqlConnection(QString const&, QString const&, QObject*)'

 

undefined reference to `bb::data&colon;:operator<<(QDebug, bb::data&colon;:DataAccessReply const&)'

 

Click Accept as Solution if this post that have solved your issue(s)!
Like if you found this post useful..
Developer
Posts: 713
Registered: ‎05-31-2010
My Device: 8520

Re: CustomSqlDataSource in Cascades.

Did you add lbbdata to your .pro file ?..

Just add in the .pro file

LIBS+=-lbbdata

Developer
Posts: 63
Registered: ‎11-12-2012
My Device: BB10 DevAlpha

Re: CustomSqlDataSource in Cascades.

Ah! I forgot that. One more query though, the quotes sample app displays UI preview for all the pages while my aplication displays the following error:

module "bb.data" is not installed

 

Click Accept as Solution if this post that have solved your issue(s)!
Like if you found this post useful..
Developer
Posts: 713
Registered: ‎05-31-2010
My Device: 8520

Re: CustomSqlDataSource in Cascades.

[ Edited ]

Place in your cpp:

bb::data&colon;::DataSource::registerQmlTypes();

 

Developer
Posts: 63
Registered: ‎11-12-2012
My Device: BB10 DevAlpha

Re: CustomSqlDataSource in Cascades.


YamilBracho wrote:

Place in your cpp:

bb::data&colon;::DataSource::registerQmlTypes();

 


Tried both:

bb::data&colon;:DataSource::registerQmlTypes();
DataSource::registerQmlTypes();

 within onStart method. doesnt work :smileysad:

Click Accept as Solution if this post that have solved your issue(s)!
Like if you found this post useful..
Developer
Posts: 713
Registered: ‎05-31-2010
My Device: 8520

Re: CustomSqlDataSource in Cascades.

onStart ? Place it in your App cpp class