SqlConnection Properties
.NET Framework 4.5
The SqlConnection type exposes the following members.
| Name | Description | |
|---|---|---|
|
ClientConnectionId | The connection ID of the most recent connection attempt, regardless of whether the attempt succeeded or failed. |
|
ConnectionString | Gets or sets the string used to open a SQL Server database. (Overrides DbConnection.ConnectionString.) |
|
ConnectionTimeout | Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error. (Overrides DbConnection.ConnectionTimeout.) |
|
Container | Gets the IContainer that contains the Component. (Inherited from Component.) |
|
Credential | Gets or sets the SqlCredential object for this connection. |
|
Database | Gets the name of the current database or the database to be used after a connection is opened. (Overrides DbConnection.Database.) |
|
DataSource | Gets the name of the instance of SQL Server to which to connect. (Overrides DbConnection.DataSource.) |
|
FireInfoMessageEventOnUserErrors | Gets or sets the FireInfoMessageEventOnUserErrors property. |
|
PacketSize | Gets the size (in bytes) of network packets used to communicate with an instance of SQL Server. |
|
ServerVersion | Gets a string that contains the version of the instance of SQL Server to which the client is connected. (Overrides DbConnection.ServerVersion.) |
|
Site | Gets or sets the ISite of the Component. (Inherited from Component.) |
|
State | Indicates the state of the SqlConnection during the most recent network operation performed on the connection. (Overrides DbConnection.State.) |
|
StatisticsEnabled | When set to true, enables statistics gathering for the current connection. |
|
WorkstationId | Gets a string that identifies the database client. |