About 2,600 results
Open links in new tab
  1. SqlConnection Class (Microsoft.Data.SqlClient) | Microsoft Learn

    A SqlConnection object represents a unique session to a SQL Server data source. With a client/server database system, it is equivalent to a network connection to the server.

  2. C# - SqlConnection Example - Dot Net Perls

    Dec 24, 2024 · We use SqlConnection in a "using" statement. The SqlConnection has a constructor that requires a string reference pointing to the connection string character data.

  3. How do I connect to a SQL database from C#? - Stack Overflow

    SqlConnection documentation from Microsoft was mentioned in another answer. What is missing is that does not need to be called if used in the following way (example is directly from the link above):

  4. Connecting to SQL Server in C# Using SqlConnection Connection String

    Aug 7, 2024 · The SqlConnection class in C# provides a straightforward way to connect to a SQL Server instance. To establish a successful connection, you need to construct a well-formed connection …

  5. How to Connect to SQL Database on C# - Delft Stack

    Feb 2, 2024 · This tutorial demonstrates how to connect to a SQL database on C# using SqlConnection object.

  6. ADO.NET SqlConnection Class - Dot Net Tutorials

    In this article, I am going to discuss ADO.NET SqlConnection in C#. SqlConnection class is used to establish an open connection to SQL Server

  7. C# SqlClient Tutorial: SqlConnection, SqlCommand

    In this example, we use the SqlConnection and SqlCommand ADO.NET patterns. Look at the string parameter to the SqlCommand constructor, and it is an SQL command that selects all cells from …

  8. Working with SqlConnection in C# for Database Connectivity

    Aug 26, 2023 · The SqlConnection class from the System.Data.SqlClient namespace provides the necessary functionalities to connect to Microsoft SQL Server databases. This article will guide you …

  9. C# - How to connect to a MSSQL database using SqlConnection

    Jun 1, 2022 · This post demonstrates with an example how to connect to a MSSQL Database using the SqlConnection class and a valid connectionstring.

  10. Working with the SqlConnection and SqlCommand Classes in ADO.NET

    SqlConnection and SqlCommand are classes of a connected architecture and found in the System.Data.SqlClient namespace. The SqlConnection class makes a connection with the database.