Skip to content

Workaround bug in Qt6 ODBC driver #62908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 21, 2025
Merged

Conversation

nyalldawson
Copy link
Collaborator

@nyalldawson nyalldawson commented Aug 20, 2025

Use float instead of real for column. Qt6 is incorrectly reading 'real' column values as string values only, leading to truncation of decimals.

(It seems that QSqlDatabase may be ignoring the numerical precision policy set on the database for the ODBC driver, at least for 'real' column types)

I don't have the specific SQL Server knowledge to understand if this a critical issue, or whether use of 'real' for the column types implies a low-precision value inherently. All I'm doing here is hiding the issue by changing our CI tests to use float values instead!

Use float instead of real for column. Qt6 is incorrectly reading
'real' column values as string values only, leading to truncation
of decimals.

(It seems that QSqlDatabase may be ignoring the numerical
precision policy set on the database for the ODBC driver, at
least for 'real' column types)
@github-actions github-actions bot added this to the 4.0.0 milestone Aug 20, 2025
Copy link
Contributor

github-actions bot commented Aug 20, 2025

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 447a4e5)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This installer is not signed, control+click > open the app to avoid the warning
(Built from commit 447a4e5)

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 447a4e5)

@nyalldawson nyalldawson merged commit 972f31b into qgis:master Aug 21, 2025
37 checks passed
@nyalldawson nyalldawson deleted the mssl_qt6 branch August 21, 2025 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants