Skip to content

Allow setting of connection string attributes - #1465

Merged
mkleehammer merged 1 commit into
mkleehammer:masterfrom
bkline:505-get-attr-string
Jun 6, 2026
Merged

mkleehammer merged 1 commit into
mkleehammer:masterfrom
bkline:505-get-attr-string

Conversation

@bkline

@bkline bkline commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

I don't see any evidence that the regression tests are run with the ability to create a database, so I can't write a test that verifies the behavior requested by the OP (though I have tested locally to confirm that it works as expected with a DBMS which supports switching the current database for an existing connection; see ticket).

Fixes #505

@bkline

bkline commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

Hold off on review until I add a test.

@bkline
bkline force-pushed the 505-get-attr-string branch from 17e4919 to 9674187 Compare March 5, 2026 09:48
@bkline

bkline commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

OK, the test has been added. Had a moment of mild panic, before I realized that the failing test wasn't related to this PR. Perhaps related to #1459 (though the test which was seg-faulting in this case was test_cursor_with_print(), not test_tvp() as reported in that ticket)? I did confirm that pyodbc dumps core with test_cursort_with_print() (I haven't yet downgraded my 18.6.1.1 SQL Server driver) without this PR, so I'm reasonably confident that it's not related to this patch.

@mkleehammer
mkleehammer merged commit 4658198 into mkleehammer:master Jun 6, 2026
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.

Add support for changing the current catalog via Connection#set_attr

2 participants