Skip to content

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

@Bart-Source

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions