Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.8.1
-
7a34e88edcc8b05744cede732f79f99acaad75ef
Description
I read data from a database table. In the database table the number (hmilanguageid) is stored as 258059710618920545.
My statement is:
QSharedPointer<QSqlQuery> pQuery("SELECT hmilanguageid, to_char(hmilanguageid) FROM hmilanguage"); int fieldNo = pQuery->record().indexOf("hmilanguageid"); while(pQuery->next()) { qlonglong langid = pQuery->value(fieldNo).toLongLong(); QString text = pQuery->value(fieldNo+1).toString(); __int64 v = _atoi64(text.toStdString().c_str()); }
I got under Windows 7, VS 2008 the following result:
- langid = 258059710618920512
- text = "258059710618920545"
- v = 258059710618920545
There must be an bug into the method toLongLong();