

# Migrate from ODBC 2.x

For requirements and behavior on engine version 3 and DuckDB workgroups, see [Requirements and behavior by workgroup engine](odbc-v4-driver-engine-comparison.md).

Compare your ODBC 2.x configuration with the 4.x changes before switching the installed driver or a workgroup engine. The following comparisons use the 2.6.0.0 source as the prior-version baseline.

The following table describes migration differences.



| Area | ODBC 4.x behavior | Action | 
| --- | --- | --- | 
| Engine selection | Resolves engine version 3 or DuckDB from the workgroup configuration; EngineVersion can override the engine. | Grant athena:GetWorkGroup; create a new connection after changing the workgroup engine, taking the connection cache guidance into account. | 
| DuckDB managed results | Adds GetQueryResultStream Arrow results. | Use ResultFetcher=auto, or explicitly choose a fetcher supported by both the engine and result storage. | 
| Legacy fetcher toggles | For DuckDB, UseResultsetStreaming and EnableS3Fetcher must be absent, empty, or the literal string 0. | Remove the toggles and configure ResultFetcher. | 
| Polling | Default maximum changes from 60000 ms to 5000 ms; multiplier changes from 2 to 1.25. | Review custom polling overrides. | 
| Query timeout | Adds QueryTimeout as an inherited statement timeout, separately from MaxPollDuration. | Set seconds for QueryTimeout; milliseconds for MaxPollDuration. | 
| Unicode type reporting | Supports UseWCharForStringTypes and the UseSQLUnicodeTypes alias, which were already present in 2.6.0.0. | Review column metadata and default C bindings if enabling it. | 
| Result text | Uses DuckDB-specific result rendering and extended type mappings for DuckDB queries. | Review consumers that parse nested or temporal text. | 
| Connection configuration cache | When EnableConnectionCaching is enabled, the cached configuration includes engine and result storage. | Disable EnableConnectionCaching or wait for the five-minute cache to expire before reconnecting after workgroup changes. | 

When loading a DSN, ODBC 4.x ignores the exact values `MaxQueryExecutionPollingInterval=60000` and `QueryExecutionPollingIntervalMultiplier=2`, including values set intentionally. To retain either value, set it explicitly in the connection string.

Changing the driver does not translate SQL between engine version 3 and DuckDB. The driver chooses the matching SQL dialect for escape sequences and parameter rendering.

Driver version `4.x` and the ODBC API version selected by an application are different. Cancellation behavior described for ODBC API 2.x or 3.x refers to the application API mode.