What Is an SQL Client Connection?

SqlConnection represents an open connection to a SQL Server database. This class cannot be inherited.

SqlConnection

Right!
SqlConnection represents an open connection to a SQL Server database. This class cannot be inherited.
Foreign name
SqlConnection
Definition
SQL Server Database Open Connection
Features
Cannot be inherited
Namespaces
System.Data.SqlClient
Inheritance hierarchy
SystemObject
SystemMarshalByRefObject
System.ComponentModelComponent
System.Data.CommonDbConnection
System.Data.SqlClientSqlConnection
System.Data (in System.Data.dll)
[pre] Public NotInheritable Class SqlConnection _ Inherits DbConnection _ Implements ICloneable [pre]
<li class = "list-num-1-1 list-num-paddingleft-1">
public sealed class SqlConnection: DbConnection,
</ li> <li class = "list-num-1-2 list-num-paddingleft-1">
ICloneable
</ li> [pre] public ref class SqlConnection sealed: public DbConnection, ICloneable [pre] [<Sealed>] type SqlConnection = class inherit DbConnection interface ICloneable end
The SqlConnection type exposes the following members.
name
Description
The SqlConnection object represents a single session to a SQL Server data source. In a client / server database system, it is equivalent to a network connection to the server. When connecting to a Microsoft SQL Server database, the SqlConnection communicates with
The following example creates one
.NET Framework
Supported by: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0
.NET Framework Client Profile
Supported by: 4, 3.5 SP1
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role is not supported), Windows Server 2008 R2 (Server Core Role with SP1 or later is supported; Itanium is not supported)
The .NET Framework does not support all versions of every platform. For a list of supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread-safe. There is no guarantee that all instance members are thread-safe.
See
System.Data.SqlClient namespace
Other resources
Connecting to a Data Source (ADO.NET)
Using the .NET Framework Data Provider for SQL Server
(ADO.NET Managed Provider and Dataset Developer Center)

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?