Skip to content

Fix incorrect snippet description #3490

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

Merged
merged 1 commit into from
Jul 21, 2025
Merged

Fix incorrect snippet description #3490

merged 1 commit into from
Jul 21, 2025

Conversation

David-Engel
Copy link
Contributor

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

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 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
Copy link
Contributor

@Copilot Copilot AI left a comment

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
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.
4 participants