Skip to content

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

Closed
dotnet/SqlClient
#3490

Description

@Bart-Source

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

Document Version Independent Id

a62262c6-caf5-721d-a339-f4039ba3e452

Platform Id

02eff5f8-822a-f8c2-5557-267a9ba1c8e3

Article author

@dotnet-bot

Activity

  1. dotnet-policy-service commented on Jul 17, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @cheenamalhotra, @David-Engel

  2. self-assigned this
    on Jul 17, 2025
  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions