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
Contributor
jurafloringheorghe
Posts: 16
Registered: ‎12-16-2010

sql connection QSqlError::type= "QSqlError::ConnectionError"

I keep getting this error when I try to connect to a database and perform a select

The database is found but it seems it cannot connect  .(the query is ok 100%)?

 

The error happens at  mSqlConnector->executeAndWait(query, INITIAL_LOAD_ID);

 

. QSqlError::type= "QSqlError::ConnectionError" , QSqlError::number= -1 , databaseText= "No query" , driverText= "Unable to fetch row"

 

 

Please use plain text.
Developer
Zmey
Posts: 1,495
Registered: ‎12-18-2012

Re: sql connection QSqlError::type= "QSqlError::ConnectionError"

Hi! Could you show more code? How the query is defined, SqlConnection initialization etc.

Andrey Fidrya, @zmeyc on twitter
Please use plain text.
Contributor
jurafloringheorghe
Posts: 16
Registered: ‎12-16-2010

Re: sql connection QSqlError::type= "QSqlError::ConnectionError"

[ Edited ]

this happens even in a basic example:

 

https://developer.blackberry.com/cascades/reference/bb__data__datasource.html

 

 

I was curios if someone else had the same problem

 

Please use plain text.
Contributor
jurafloringheorghe
Posts: 16
Registered: ‎12-16-2010

Re: sql connection QSqlError::type= "QSqlError::ConnectionError"

[ Edited ]

It seems that the problem got solved by reinstalling the virtual machine

Please use plain text.
Developer
calicratis19
Posts: 163
Registered: ‎12-06-2012
My Carrier: BlackBerry

Re: sql connection QSqlError::type= "QSqlError::ConnectionError"

Mine too solved after reinstalling the virtual machine. But it seems I am unable to create a .db file in assets folder. http://supportforums.blackberry.com/t5/Cascades-Development/Can-t-create-a-db-file-in-assets-folder/...

Please use plain text.