-
Notifications
You must be signed in to change notification settings - Fork 10
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
Using DSN with SQLDriverConnect does not use the DSN settings #48
Comments
staticlibs
added a commit
to staticlibs/duckdb-odbc
that referenced
this issue
Jan 26, 2025
When connection string includes a trailing comma, existing impl in Connect::ParseInputStr was doing an early exit without setting DSN value to dbc->dsn. Because of this DSN was not used and default :memory: instance was created. The problem is not OS specific, but was happening on Windows all the time because Windows ODBC Driver Manager is appending comma to the passed connection string when calling SQLDriverConnect. test_connect_odbc was extended to cover the trailing comma and also parameters overriding in connection string. Fixes: duckdb#29, duckdb#48
staticlibs
added a commit
to staticlibs/duckdb-odbc
that referenced
this issue
Jan 26, 2025
When connection string includes a trailing comma, existing impl in Connect::ParseInputStr was doing an early exit without setting DSN value to dbc->dsn. Because of this DSN was not used and default :memory: instance was created. The problem is not OS specific, but was happening on Windows all the time because Windows ODBC Driver Manager is appending comma to the passed connection string when calling SQLDriverConnect. test_connect_odbc was extended to cover the trailing comma and also parameters overriding in connection string. Fixes: duckdb#29, duckdb#48
I think this is a duplicate of #29. |
Yes, this is correct for #29 too, if the connection string ends with a semicolon (that is always true on Windows), then the DSN value is not set internally and DSN configuration from registry ( |
staticlibs
added a commit
to staticlibs/duckdb-odbc
that referenced
this issue
Feb 1, 2025
When connection string includes a trailing comma, existing impl in Connect::ParseInputStr was doing an early exit without setting DSN value to dbc->dsn. Because of this DSN was not used and default :memory: instance was created. The problem is not OS specific, but was happening on Windows all the time because Windows ODBC Driver Manager is appending comma to the passed connection string when calling SQLDriverConnect. test_connect_odbc was extended to cover the trailing comma and also parameters overriding in connection string. Fixes: duckdb#29, duckdb#48
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a DSN MyDuckDb where I have 4 keys:
database -> "c:\dataPath\myDuckDb.ddb"
driver -> "C:\Windows\System32\duckdb_odbc.dll"
debug_window_mode -> "window"
debug_skip_checkpoint_on_commit -> "yes"
when using SQLDriverConnect I use: "DSN=MyDuckDb", but it always connect to :memory:, and does not take into account the other two settings: debug_window_mode and debug_skip_checkpoint_on_commit.
The text was updated successfully, but these errors were encountered: