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

Posts: 20
Registered: ‎10-25-2010
My Device: Not Specified
Accepted Solution

SqlDataAccess Issue



So, as a warning, I'm really out of practice with C++ development, so, this could be something simple.


Yesterday I downloaded the new NDK (10.0.06), and opened up my app.  There were some API method changes that I quickly fixed, but, there is one issue I have that I can't seem to solve.  In my app, I'm using a SqlLite DB.  The following is a code snippet:


SqlDataAccess sqlDataAccess("myDB.db");
sqlData = sqlDataAccess.execute("select * from myTable").value<QVariantList>();
if (sqlDataAccess.hasError()) {
  DataAccessError err = sqlDataAccess.error();
  qWarning() << "SQL error: type=" << err.errorType() << ": "
	<< err.errorMessage();
  return sqlData;

 This worked a-ok in 10.0.04 (as did the quotes sample project), but, now, the compile fails with 


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


(along with others).


My header is including

<QtSQL/QtSQL> and <bb/data/SqlDataAccess>

and using the bb::data namespace.


My class file is using the bb::data namespace.


Any help would be much appreciated!




Dan Slack

Posts: 207
Registered: ‎05-08-2012
My Device: PlayBook 64 Gb and Z10 LE
My Carrier: Vodafone

Re: SqlDataAccess Issue

I too have the same problem ..


If U like my post click on LIKE Smiley Wink
Posts: 20
Registered: ‎10-25-2010
My Device: Not Specified

Re: SqlDataAccess Issue

Found the solution - I checked in my code, and was getting the same error with the JsonDataAccess object.  And, from that, somebody posted a solution to that  here.


TL;DR - add 

LIBS += -lbbdata


to your projects ".pro" file (I just added at the bottom).



Posts: 13
Registered: ‎06-05-2012
My Device: Torch 9800, PlayBook, BB10 Dev Alpha
My Carrier: Rogers

Re: SqlDataAccess Issue

I too got this problem and this solved the problem!