SqlConnectionStringBuilder Properties

 

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_pubpropertyApplicationIntent

Declares the application workload type when connecting to a database in an SQL Server Availability Group. You can set the value of this property with ApplicationIntent. For more information about SqlClient support for Always On Availability Groups, see SqlClient Support for High Availability, Disaster Recovery.

System_CAPS_pubpropertyApplicationName

Gets or sets the name of the application associated with the connection string.

System_CAPS_pubpropertyAsynchronousProcessing

Gets or sets a Boolean value that indicates whether asynchronous processing is allowed by the connection created by using this connection string.

System_CAPS_pubpropertyAttachDBFilename

Gets or sets a string that contains the name of the primary data file. This includes the full path name of an attachable database.

System_CAPS_pubpropertyAuthentication

Gets the authentication of the connection string.

System_CAPS_pubpropertyBrowsableConnectionString

Gets or sets a value that indicates whether the ConnectionString property is visible in Visual Studio designers.(Inherited from DbConnectionStringBuilder.)

System_CAPS_pubpropertyColumnEncryptionSetting

Gets and sets the column encryption settings for the connection string builder.

System_CAPS_pubpropertyConnectionReset

Obsolete.Obsolete. Gets or sets a Boolean value that indicates whether the connection is reset when drawn from the connection pool.

System_CAPS_pubpropertyConnectionString

Gets or sets the connection string associated with the DbConnectionStringBuilder.(Inherited from DbConnectionStringBuilder.)

System_CAPS_pubpropertyConnectRetryCount

[Supported in the .NET Framework 4.5.1 and later versions]

The number of reconnections attempted after identifying that there was an idle connection failure. This must be an integer between 0 and 255. Default is 1. Set to 0 to disable reconnecting on idle connection failures. An ArgumentException will be thrown if set to a value outside of the allowed range.

System_CAPS_pubpropertyConnectRetryInterval

[Supported in the .NET Framework 4.5.1 and later versions]

Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure. This must be an integer between 1 and 60. The default is 10 seconds. An ArgumentException will be thrown if set to a value outside of the allowed range.

System_CAPS_pubpropertyConnectTimeout

Gets or sets the length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.

System_CAPS_pubpropertyContextConnection

Gets or sets a value that indicates whether a client/server or in-process connection to SQL Server should be made.

System_CAPS_pubpropertyCount

Gets the current number of keys that are contained within the ConnectionString property.(Inherited from DbConnectionStringBuilder.)

System_CAPS_pubpropertyCurrentLanguage

Gets or sets the SQL Server Language record name.

System_CAPS_pubpropertyDataSource

Gets or sets the name or network address of the instance of SQL Server to connect to.

System_CAPS_pubpropertyEncrypt

Gets or sets a Boolean value that indicates whether SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed.

System_CAPS_pubpropertyEnlist

Gets or sets a Boolean value that indicates whether the SQL Server connection pooler automatically enlists the connection in the creation thread's current transaction context.

System_CAPS_pubpropertyFailoverPartner

Gets or sets the name or address of the partner server to connect to if the primary server is down.

System_CAPS_pubpropertyInitialCatalog

Gets or sets the name of the database associated with the connection.

System_CAPS_pubpropertyIntegratedSecurity

Gets or sets a Boolean value that indicates whether User ID and Password are specified in the connection (when false) or whether the current Windows account credentials are used for authentication (when true).

System_CAPS_pubpropertyIsFixedSize

Gets a value that indicates whether the SqlConnectionStringBuilder has a fixed size.(Overrides DbConnectionStringBuilder.IsFixedSize.)

System_CAPS_pubpropertyIsReadOnly

Gets a value that indicates whether the DbConnectionStringBuilder is read-only.(Inherited from DbConnectionStringBuilder.)

System_CAPS_pubpropertyItem[String]

Gets or sets the value associated with the specified key. In C#, this property is the indexer.(Overrides DbConnectionStringBuilder.Item[String].)

System_CAPS_pubpropertyKeys

Gets an ICollection that contains the keys in the SqlConnectionStringBuilder.(Overrides DbConnectionStringBuilder.Keys.)

System_CAPS_pubpropertyLoadBalanceTimeout

Gets or sets the minimum time, in seconds, for the connection to live in the connection pool before being destroyed.

System_CAPS_pubpropertyMaxPoolSize

Gets or sets the maximum number of connections allowed in the connection pool for this specific connection string.

System_CAPS_pubpropertyMinPoolSize

Gets or sets the minimum number of connections allowed in the connection pool for this specific connection string.

System_CAPS_pubpropertyMultipleActiveResultSets

When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.

For more information, see Multiple Active Result Sets (MARS).

System_CAPS_pubpropertyMultiSubnetFailover

If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true provides faster detection of and connection to the (currently) active server. For more information about SqlClient support for Always On Availability Groups, see SqlClient Support for High Availability, Disaster Recovery.

System_CAPS_pubpropertyNetworkLibrary

Gets or sets a string that contains the name of the network library used to establish a connection to the SQL Server.

System_CAPS_pubpropertyPacketSize

Gets or sets the size in bytes of the network packets used to communicate with an instance of SQL Server.

System_CAPS_pubpropertyPassword

Gets or sets the password for the SQL Server account.

System_CAPS_pubpropertyPersistSecurityInfo

Gets or sets a Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.

System_CAPS_pubpropertyPoolBlockingPeriod

The blocking period behavior for a connection pool.

System_CAPS_pubpropertyPooling

Gets or sets a Boolean value that indicates whether the connection will be pooled or explicitly opened every time that the connection is requested.

System_CAPS_pubpropertyReplication

Gets or sets a Boolean value that indicates whether replication is supported using the connection.

System_CAPS_pubpropertyTransactionBinding

Gets or sets a string value that indicates how the connection maintains its association with an enlisted System.Transactions transaction.

System_CAPS_pubpropertyTransparentNetworkIPResolution

Gets or sets a boolean value.

System_CAPS_pubpropertyTrustServerCertificate

Gets or sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.

System_CAPS_pubpropertyTypeSystemVersion

Gets or sets a string value that indicates the type system the application expects.

System_CAPS_pubpropertyUserID

Gets or sets the user ID to be used when connecting to SQL Server.

System_CAPS_pubpropertyUserInstance

Gets or sets a value that indicates whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller.

System_CAPS_pubpropertyValues

Gets an ICollection that contains the values in the SqlConnectionStringBuilder.(Overrides DbConnectionStringBuilder.Values.)

System_CAPS_pubpropertyWorkstationID

Gets or sets the name of the workstation connecting to SQL Server.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.IsSynchronized

Gets a value indicating whether access to the ICollection is synchronized (thread safe).(Inherited from DbConnectionStringBuilder.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.SyncRoot

Gets an object that can be used to synchronize access to the ICollection.(Inherited from DbConnectionStringBuilder.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDictionary.Item[Object]

Gets or sets the element with the specified key.(Inherited from DbConnectionStringBuilder.)

Return to top
Show: