QSqlQuery::next () returns false on OSX..
-
@Christian-Ehrlicher I really 101% sure there is data ... here is a screenshot
I forgot something important, the database I'm using is MariaDB on a remote server, is accessed by all three operating systems... there is no local db..
-
Did you do what @JonB suggests with select count(*)? Did you try to insert data into the table just to see if it works?
-
@U7Development
We're not saying there isn't a problem/bug here, just that you need to try a few things. Does it depend on table? Does simply every query fail to return any rows? Does an INSERT work at all? Did you build for yourself or install the Qt or the MySQL ODBC? -
Hi,
To add to my fellows, since it's a remote database, are you sure your Mac machine is allowed to access that specific database ?
On an unrelated not, keeping local copies of QSqlDatabase object is highly not recommended as explained in the class documentation.
-
Thanks all for answering..
I'll do some queries to check if I can insert/remove or update cells from my Mac machine...
I don't know how to check if my Mac is being blocked by my DB, I just installed ODBC Mysql connector as documented...Will return later for updates.
Thanks again.
-
@U7Development Out of curiosity - if you use MariaDB why bother with ODBC if you can use MysqlConnector directly?
-
Tests done:
-
Pushing a row into tcuentas:
db is valid outputs true
db is open outputs trueif consulta.exec(). outputs true..
finally checked into tcuentas and the row exists, so the test succeeds. -
Executed select count(*) from tcuentas
db is valid outputs true
db is open outputs truewhile consulta.next() outputs false...
Seems to be something with the query itself...
It is not mandatory to use Mac OSX by the way... for now I will use VirtualBox Windows 10 and continue developing there, this post was created just by curiosity.., if I find a solution in the meanwhile I will post here..
Thanks!
-