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
dslack
Posts: 20
Registered: ‎10-25-2010
My Device: Not Specified
Accepted Solution

SqlDataAccess Issue

Hi,

 

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::smileyfrustrated:qlDataAccess::smileyfrustrated:qlDataAccess(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!

 

Thanks,

 

Dan Slack

Developer
Zukka
Posts: 201
Registered: ‎05-08-2012
My Device: PlayBook 64 Gb and Z10 LE

Re: SqlDataAccess Issue

I too have the same problem ..

_______________________________________________

If U like my post click on LIKE :smileywink:
Developer
dslack
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).

 

 

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

Re: SqlDataAccess Issue

I too got this problem and this solved the problem!

Gull
www.appsever.com