DavidBell
13th November 2016, 06:57
I am accessing data from an SQLite database created in another application (SQLiteStudio) that has a field that contains a double.
It all works ok except that I am only getting six significant digits (ie float) whereas the file In SQLiteStudio it has 11 significant digits.
Any help appreciated, need full precision for this case.
Code snip folows
David Bell
QSqlQuery getTreesquery(dbsrc);
getTreesquery.setNumericalPrecisionPolicy(QSql::Hi ghPrecision); // database precision also set to high
getTreesquery.exec("SELECT * FROM Objects WHERE yada yada");
while (getTreesquery.next())
{
double gpsLatitude = getTreesquery.record().value(eGOF_LATITUDE).toDoub le(); // only six digits
}
It all works ok except that I am only getting six significant digits (ie float) whereas the file In SQLiteStudio it has 11 significant digits.
Any help appreciated, need full precision for this case.
Code snip folows
David Bell
QSqlQuery getTreesquery(dbsrc);
getTreesquery.setNumericalPrecisionPolicy(QSql::Hi ghPrecision); // database precision also set to high
getTreesquery.exec("SELECT * FROM Objects WHERE yada yada");
while (getTreesquery.next())
{
double gpsLatitude = getTreesquery.record().value(eGOF_LATITUDE).toDoub le(); // only six digits
}