Details
-
Bug
-
Resolution: Cannot Reproduce
-
P1: Critical
-
None
-
5.15.2
-
None
-
MSSQL ODBC Driver 18.1.2
Description
when accessing data via SQL Server ODBC Driver 18.1.2, QODBC database query can't read value from FLOAT type field. example:
#include <QtSql/QSqlDatabase> #include <QtSql/QSqlQuery> #include <QtCore/QVariant> int main(int argc, char *argv[]) { auto db = QSqlDatabase::addDatabase("QODBC"); db.setDatabaseName("Driver={SQL Server};Server=192.168.1.2;Uid=sa;Pwd=123;Database=master"); db.open(); QSqlQuery qry("SELECT CAST(1234.56 AS FLOAT)", db); qry.next(); auto val = qry.value(0).toFloat(); printf_s("= %f\n", val); // = 0.000000 on Windows 11 with KB5019961 // = 1234.560059 on Windows 11 without KB5019961 db.close(); }
Attachments
Issue Links
- is duplicated by
-
QTBUG-108912 Retrieving columns with float valiues from MS SqlServer fails after KB5019959
- Closed