Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SqlConnection Properties

SqlConnection Properties

The SqlConnection type exposes the following members.

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