Skip to content

Use SQL_NUMERIC_STRUCT by default for DECIMAL/NUMERIC values#1470

Merged
mkleehammer merged 2 commits into
mkleehammer:masterfrom
bkline:753-binary-decimal
Jun 6, 2026
Merged

Use SQL_NUMERIC_STRUCT by default for DECIMAL/NUMERIC values#1470
mkleehammer merged 2 commits into
mkleehammer:masterfrom
bkline:753-binary-decimal

Conversation

@bkline

@bkline bkline commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

This avoids problems caused by incorrect guesses about what character is used for the decimal separator when the values are returned as strings.

A new connection property (fetch_decimal_as_string) is added for overriding the new default behavior.

Also fixed a bug in the fallback function DecimalFromText(), which was missing an argument in a Python API call.

Fixes #753

This avoids problems caused by incorrect guesses about what
character is used for the decimal separator when the values
are returned as strings.

A new connection property (fetch_decimal_as_string) is added
for overriding the new default behavior.

Also fixed a bug in the fallback function DecimalFromText(),
which was missing an argument in a Python API call.

Fixes mkleehammer#753
@bkline
bkline force-pushed the 753-binary-decimal branch from a99c3d7 to 90c5999 Compare April 20, 2026 15:21
# Conflicts:
#	src/connection.cpp
#	src/pyodbc.pyi
@mkleehammer
mkleehammer merged commit 87c345b into mkleehammer:master Jun 6, 2026
8 of 9 checks passed
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.

Decimal results incorrect depending on locale

2 participants