Add new conn-string synonyms for cross-driver alignment#4192
Merged
apoorvdeshmukh merged 2 commits intomainfrom Apr 23, 2026
Merged
Add new conn-string synonyms for cross-driver alignment#4192apoorvdeshmukh merged 2 commits intomainfrom
apoorvdeshmukh merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds additional connection string keyword synonyms so Microsoft.Data.SqlClient accepts space-free/camelCase keywords commonly used by other SQL drivers, improving cross-driver connection string portability.
Changes:
- Added new synonyms (
ConnectTimeout,FailoverPartner,PacketSize,WorkstationID,columnEncryption) to the synonym constants and keyword-resolution maps. - Updated
SqlConnectionStringBuilderkeyword dictionary to recognize the new synonyms. - Added functional tests verifying the synonyms are accepted and resolve to the expected builder properties.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionStringSynonyms.cs | Adds constants for the 5 new synonym strings. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionStringBuilder.cs | Maps the new synonym constants to the correct Keywords entries for builder parsing. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionString.cs | Registers the new synonyms in the connection-string keyword map used when parsing SqlConnection connection strings. |
| src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlConnectionStringBuilderTest.cs | Adds coverage ensuring the new synonyms are accepted and map to the expected properties/values. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4192 +/- ##
==========================================
- Coverage 66.63% 64.77% -1.86%
==========================================
Files 279 274 -5
Lines 42999 65825 +22826
==========================================
+ Hits 28651 42637 +13986
- Misses 14348 23188 +8840
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mdaigle
approved these changes
Apr 17, 2026
cheenamalhotra
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add 5 new connection string keyword synonyms for cross-driver alignment
Adds space-free and camelCase synonym mappings so that connection strings using keywords common across other SQL drivers (ODBC, OLEDB, JDBC, PHP, Python, Rust) are accepted by Microsoft.Data.SqlClient:
Connect TimeoutConnectTimeoutFailover PartnerFailoverPartnerPacket SizePacketSizeWorkstation IDWorkstationIDColumn Encryption SettingcolumnEncryptionIssues
Fixes AB#44014
Testing
Added unit tests for the new synonyms
Guidelines
Please review the contribution guidelines before submitting a pull request: