Share via


ReliableSqlConnection Members

Include Protected Members
Include Inherited Members

Retired Content

This content and the technology described is outdated and is no longer being maintained. For more information about Transient Fault Handling, see Transient Fault Handling.

The ReliableSqlConnection type exposes the following members.

Constructors

  Name Description
Public method ReliableSqlConnection(String)
Initializes a new instance of the ReliableSqlConnection class with a given connection string. Uses the default retry policy for connections and commands unless retry settings are provided in the connection string.
Public method ReliableSqlConnection(String, RetryPolicy)
Initializes a new instance of the ReliableSqlConnection class with a given connection string and a policy defining whether to retry a request if the connection fails to be opened or a command fails to be successfully executed.
Public method ReliableSqlConnection(String, RetryPolicy, RetryPolicy)
Initializes a new instance of the ReliableSqlConnection class. Initializes a new instance of the SqlAzureConnection class with a given connection string and a policy defining whether to retry a request if the connection fails to be opened or a command fails to be successfully executed.

Methods

  Name Description
Public method BeginTransaction()
Begins a database transaction.
Public method BeginTransaction(IsolationLevel)
Begins a database transaction with the specified System.Data.IsolationLevel value.
Public method ChangeDatabase
Changes the current database for an open Connection object.
Public methodStatic member ClearConnectionStringCache
Clears the connection string cache.
Public method Close
Closes the connection to the database.
Public method CreateCommand
Creates and returns a SqlCommand object associated with the underlying SqlConnection.
Public method Dispose
Performs application-defined tasks associated with freeing, releasing, or resetting managed and unmanaged resources.
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public method ExecuteCommand(IDbCommand)
Executes a SQL command and returns the number of rows affected.
Public method ExecuteCommand(IDbCommand, RetryPolicy)
Executes a SQL command and returns the number of rows affected.
Public method ExecuteCommand<T>(IDbCommand)
Executes a SQL command and returns a result defined by the specified type T. This method uses the retry policy specified when instantiating the SqlAzureConnection class (or the default retry policy if no policy was set at construction time).
Public method ExecuteCommand<T>(IDbCommand, RetryPolicy)
Executes a SQL command using the specified retry policy and returns a result defined by the specified type T
Public method ExecuteCommand<T>(IDbCommand, CommandBehavior)
Executes a SQL command and returns a result defined by the specified type T. This method uses the retry policy specified when instantiating the SqlAzureConnection class (or the default retry policy if no policy was set at construction time).
Public method ExecuteCommand<T>(IDbCommand, RetryPolicy, CommandBehavior)
Executes a SQL command using the specified retry policy and returns a result defined by the specified type T
Protected method Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic member GetDnsSafeConnectionString
Modifies the specified connection string to potentially improve reliability of a connection to SQL Azure database. If asynchronous mode is requested, modifications are performed in background and may not be reflected immediately.
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Open()
Opens a database connection with the settings specified by the ConnectionString and ConnectionRetryPolicy properties.
Public method Open(RetryPolicy)
Opens a database connection with the settings specified by the ConnectionString and specified retry policy.
Public method ToString
Returns a String that represents the current Object.
(Inherited from Object.)

Properties

  Name Description
Public property CommandRetryPolicy
Gets the policy which decides whether to retry a command, based on how many times the request has been made and the reason for the last failure.
Public property ConnectionRetryPolicy
Gets the policy which decides whether to retry a connection request, based on how many times the request has been made and the reason for the last failure.
Public property ConnectionString
Gets or sets the connection string for opening a connection to the SQL Azure database.
Public property ConnectionTimeout
Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
Public property Current
Gets an instance of the SqlConnection object that represents the connection to an instance of SQL Azure database.
Public property Database
Gets the name of the current database or the database to be used after a connection is opened.
Public property SessionTracingId
Gets the CONTEXT_INFO value that was set for the current session. This value can be used for tracing the query execution problems.
Public property State
Gets the current state of the connection.

See Also

ReliableSqlConnection Class

Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.SqlAzure Namespace