Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix incorrect snippet description - #3490

#3490
Merged
paulmedynski merged 1 commit into
maindotnet/SqlClient:mainfrom
David-Engel-patch-1dotnet/SqlClient:David-Engel-patch-1Copy head branch name to clipboard
Jul 21, 2025
Merged

Fix incorrect snippet description#3490
paulmedynski merged 1 commit into
maindotnet/SqlClient:mainfrom
David-Engel-patch-1dotnet/SqlClient:David-Engel-patch-1Copy head branch name to clipboard

Conversation

@David-Engel

@David-Engel David-Engel commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

Fixes dotnet/dotnet-api-docs#11583

Porting to MDS.

Type of issue

Typo

Description

The example used for SqlCommand(String) has the following description:

"The following example creates a SqlCommand, passing in the connection string and command text."

The problem is the lack of a connection string in the example. How should the the connection string be provided in this example? I assume the proper description would be:

"The following example creates a SqlCommand, passing in the command text."

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlcommand.-ctor?view=net-9.0-pp#system-data-sqlclient-sqlcommand-ctor(system-string)

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Data.SqlClient/SqlCommand.xml

Copilot AI review requested due to automatic review settings July 17, 2025 21:13
@David-Engel
David-Engel requested a review from a team as a code owner July 17, 2025 21:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an incorrect documentation snippet description for the SqlCommand constructor. The correction removes an inaccurate reference to "connection string" since the constructor being documented only takes command text as a parameter.

@paulmedynski
paulmedynski merged commit 27aaa9e into main Jul 21, 2025
6 checks passed
@paulmedynski
paulmedynski deleted the David-Engel-patch-1 branch July 21, 2025 23:45
This was referenced Mar 17, 2026
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.

SqlCommand(String) overload example description is bad. A connection string is not passed in.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.