SqlConnection Properties
Assembly: System.Data (in System.Data.dll)
| Name | Description | |
|---|---|---|
![]() | AccessToken | Gets or sets the access token for the connection. |
![]() | ClientConnectionId | The connection ID of the most recent connection attempt, regardless of whether the attempt succeeded or failed. |
![]() ![]() | ColumnEncryptionKeyCacheTtl | Gets or sets the time-to-live for column encryption key entries in the column encryption key cache for the Always Encrypted feature. The default value is 2 hours. 0 means no caching at all. |
![]() ![]() | ColumnEncryptionQueryMetadataCacheEnabled | Gets or sets a value that indicates whether query metadata caching is enabled (true) or not (false) for parameterized queries running against Always Encrypted enabled databases. The default value is true. |
![]() ![]() | ColumnEncryptionTrustedMasterKeyPaths | Allows you to set a list of trusted key paths for a database server. If while processing an application query the driver receives a key path that is not on the list, the query will fail. This property provides additional protection against security attacks that involve a compromised SQL Server providing fake key paths, which may lead to leaking key store credentials. |
![]() | 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 | |
![]() | 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. |

