[QODBC-Desktop] SQL Query Fails on InvoiceLine Decimal Fields Due to Windows Regional Settings
Problem Description:
When querying the Invoice or InvoiceLine tables via QODBC from an external application (MS Access, Excel Power Query, SQL Server linked table), queries that retrieve columns containing DECIMAL 18 values may fail with a data type conversion error. The issue is caused by the Windows regional settings - specifically, systems where the decimal separator is configured as a comma (,) instead of a period (.).
Affected products: QODBC Desktop, QuickBooks Desktop Expected outcome: After setting Windows regional settings to use a period (.) as the decimal separator, queries on DECIMAL fields execute without errors.
Symptoms:
- Queries against
Customer or other tables work fine, but queries on Invoice or InvoiceLine return a conversion or data type error.
- The error specifically affects columns with DECIMAL 18 precision (e.g., Amount, TxnTaxDetail TotalTax, line item amounts).
- The same query works on one machine but fails on another - the only difference being Windows regional settings.
- The error may manifest as a generic SQL error or a data conversion failure without clear indication of the root cause.
- The issue is isolated to systems in regions where the decimal separator convention uses a comma (e.g., most European and South American locales).
Cause:
QuickBooks Desktop stores all monetary and decimal values using a period (.) as the decimal separator, consistent with U.S. locale conventions. When Windows regional settings are configured to use a comma (,) as the decimal separator, external applications may misinterpret decimal values returned by QODBC, or may format incoming decimal values incorrectly before sending them to QuickBooks.
For example, if a query attempts to filter on an amount like 12.50, a system with comma-based decimal settings might interpret or transmit it as 12,50, which causes a data type mismatch during SQL parsing.
Important
This is a Windows locale issue, not a QODBC or QuickBooks bug. QODBC faithfully passes data types from QuickBooks; the problem occurs when the external application layer interprets decimal separators according to local conventions.
Environment:
| Product | Version / Detail |
| QODBC Desktop |
All versions |
| QuickBooks Desktop |
All editions (Enterprise, Pro, Premier) |
| Operating System |
Windows (any version with non-US regional settings) |
| Data Source Tools |
MS Access, Excel Power Query, MS SQL Server linked tables, any ODBC consumer |
Solution:
- Open Windows Settings. Press Win + I or navigate to Control Panel.
- Navigate to Region settings: Go to Control Panel → Clock and Region → Region (or Settings → Time & Language → Region & language).
- Open Additional settings: Click the Additional settings... button in the Region dialog.
- Change the decimal symbol: In the "Numbers" tab, find Decimal symbol and set it to a period (.).
- Change the digit grouping symbol (optional): If desired, also set the Digit grouping symbol to a comma or period consistently.
- Click OK to save changes, then click OK again on the Region dialog.
- Restart your application (MS Access, Excel, SQL Server Management Studio, or any ODBC consumer) to pick up the new regional settings.
- Re-execute your query. Queries on Invoice and InvoiceLine with DECIMAL fields should now execute without errors.
Note
If you cannot change system-wide regional settings (e.g., due to organization policies), consider using a connection string or application-level locale override that forces U.S. English decimal formatting for the ODBC connection.
SQL Examples:
Query InvoiceLine Amounts (works after regional settings fix)
SELECT TxnID, RefNumber, InvoiceLineAmount FROM InvoiceLine
Filter by Decimal Amount
SELECT TxnID, RefNumber, InvoiceLineAmount FROM InvoiceLine WHERE InvoiceLineAmount >= 100.00
Query Invoice with Tax Detail (decimal fields)
SELECT TxnID, RefNumber, InvoiceLineAmount AS TotalAmount
FROM InvoiceLine
WHERE TxnDate >= {d'2026-10-01'}
GROUP BY TxnID, RefNumber, InvoiceLineAmount
Example Scenarios:
Before the fix:
A user in Poland configured Windows with European locale settings (decimal separator = comma). When querying InvoiceLine from MS Access via QODBC, any query returning an InvoiceLineAmount column failed with a data conversion error. Queries on other tables like Customer worked without issue because they did not contain DECIMAL 18 fields.
After the fix:
The user changed the Windows decimal symbol to a period in the Region settings, restarted MS Access, and re-executed the query. All InvoiceLine records were returned successfully with correct decimal values.
Additional Notes:
- Why Customer works, but Invoice does not: The Customer table does not contain monetary/decimal columns, so regional decimal settings do not affect it. Tables like Invoice, InvoiceLine, ItemServiceTaxCode, SalesReceiptLine, and JournalEntry contain DECIMAL fields and are affected.
- Impact on data entry: In addition to query failures, writing or updating decimal values (INSERT, UPDATE) from external applications may also fail with incorrect regional settings because the incoming decimal format is misinterpreted.
- Application-level override: If system-wide regional changes are not possible, some applications allow locale-specific connection overrides. For example, in ODBC connection strings, you may specify a U.S. locale to ensure consistent decimal handling.
- QuickBooks native behavior: QuickBooks Desktop always uses U.S. English conventions internally regardless of the system locale. QODBC reflects this natively, which can cause mismatches when external consumers apply local conventions.
Related Articles:
Troubleshooting QODBC Connection Errors from MS Access Understanding QODBC Data Types and Mappings How to Configure Windows Regional Settings for Applications QODBC Decimal Field Reference Guide
Keywords:
Decimal Separator Regional Settings DECIMAL 18 InvoiceLine Invoice Data Conversion Error Windows Locale Decimal Symbol MS Access Excel Power Query ODBC Data Type Monetary Fields QuickBooks Desktop Comma Separator European Region
Support Tickets: ADH-743-62397
|