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
New Developer
Posts: 16
Registered: ‎12-16-2010
My Device: Not Specified

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"

 

 

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

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
Highlighted
New Developer
Posts: 16
Registered: ‎12-16-2010
My Device: Not Specified

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

 

New Developer
Posts: 16
Registered: ‎12-16-2010
My Device: Not Specified

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

[ Edited ]

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

Developer
Posts: 163
Registered: ‎12-06-2012
My Device: Z10, Q10
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/...