ConnectionSettings Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
connection settings and creation
public class ConnectionSettings
type ConnectionSettings = class
Public Class ConnectionSettings
- Inheritance
-
ConnectionSettings
- Derived
Fields
NoConnectionTimeout |
Infinite wait |
Properties
AccessToken | |
ApplicationIntent |
The application intent of the connection Valid values are ReadWrite and ReadOnly |
ApplicationName |
The name of the application. 'SQL Management' if no application name has been provided. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException |
Authentication |
The authentication type of the connection |
ConnectAsUser |
If set to true, the connection will be made with the credentials of the specified user. This will assume impersonation, however the LoginSecure flags and Login and Password fields will not be affected. ConnectionCannotBeChangedException |
ConnectAsUserName |
Specifies the NT user that is used when creating an impersonated connection. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException PropertyNotSetException |
ConnectAsUserPassword |
Specifies password of the NT user that is used when creating an impersonated connection. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException PropertyNotSetException |
ConnectionString |
The property will return either the user specified connection string or it will return the computed connection string based on object settings. If explicitly set, All properties in the ServerConnection object will be populated to reflect the passed in connection string. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException |
ConnectTimeout |
The length of time (in seconds) to wait for a connection to the server before terminating the attempt and throwing an exception. Default is 30 seconds (same as Shiloh). Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException |
DatabaseName |
TBD |
EncryptConnection |
whether "encrypt=true" is specified in the connection string |
Login |
The SQL Server Login name that is used to connect to the server. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException PropertyNotSetException |
LoginSecure |
If set to true, Windows integrate security is used and Login and Password are ignored. If not set, Sql Server Authentication is used. Exceptions: ConnectionCannotBeChangedException |
MaxPoolSize |
The maximum number of connections allowed in the pool. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException |
MinPoolSize |
The minimum number of connections maintained in the pool. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException |
MultipleActiveResultSets |
Enable MARS from the connection. Default is false. |
NetworkProtocol |
Identifies the client network protocol that is used to connect to SQL Server. If you do not specify a network and you use a local server, shared memory is used. If you do not specify a network and you use a remote server, the one of the configured client protocols is used. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException |
NonPooledConnection |
By default, all connections to SQL Server are taken from an ADO.NET connection pool.If set to true, this allows users to create a non-pooled connection (will not be reused when closed). Exceptions: ConnectionCannotBeChangedException |
PacketSize |
Size in bytes of the network packets used to communicate with an instance of SQL Server. Default is 8192. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException |
Password |
The password that is used with Login to connect to the server. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException PropertyNotSetException |
PooledConnectionLifetime |
When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by connection lifetime. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException |
ResetConnectionString |
Tells us whether ConnectionString needs to be reset in SqlConnectionObject property of ConnectionManager or not. |
SecureConnectionString |
The property will return a SecureString version of either the user specified connection string or it will return the computed connection string based on object settings. If explicitly set, All properties in the ServerConnection object will be populated to reflect the passed in connection string. Exceptions: ConnectionCannotBeChangedException |
SecurePassword |
The password that is used with Login to connect to the server. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException PropertyNotSetException |
ServerInstance |
The name of the SQL Server the object will connect to. If not set, the local server is implied. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException |
TrustServerCertificate |
Indicate whether the client trusts the server certificate |
WorkstationId |
The name of the workstation connecting to SQL Server. Exceptions: ConnectionCannotBeChangedException InvalidPropertyValueException |
Methods
ThrowIfPropertyNotSet(String, String, Boolean) | |
ThrowIfPropertyNotSet(String, String) | |
ToString() |