Miner.Data.Access Namespace > DataSyntax Class : ApplicableIsolationLevel Method |
'Declaration
Public Overridable Function ApplicableIsolationLevel( _ ByVal level As System.Data.IsolationLevel _ ) As System.Data.IsolationLevel
'Usage
Dim instance As DataSyntax Dim level As System.Data.IsolationLevel Dim value As System.Data.IsolationLevel value = instance.ApplicableIsolationLevel(level)
public virtual System.Data.IsolationLevel ApplicableIsolationLevel( System.Data.IsolationLevel level )
public function ApplicableIsolationLevel( level: System.Data.IsolationLevel ): System.Data.IsolationLevel; virtual;
public function ApplicableIsolationLevel( level : System.Data.IsolationLevel ) : System.Data.IsolationLevel;
public: virtual System.Data.IsolationLevel ApplicableIsolationLevel( System.Data.IsolationLevel level )
public: virtual System.Data.IsolationLevel ApplicableIsolationLevel( System.Data.IsolationLevel level )
Choosing an appropriate isolation level for a transaction depends on what happens within the transaction. However, not all transaction levels are supported by all databases (applicable). This usually depends on how isolation is implemented: whether through locking or versioning.
This method will return an isolation level, supported by the given database, that has at least the degree of isolation as requested.
For example: For a given transaction it is determined that isolation level "RepeatableRead" is required for correctness. While this will work for SQLServer, this isolation level is not supported by Oracle. For Oracle, you must use isolation level Serializable instead, for the same level of isolation.
Transactional COM+, by Tim Ewald, is an excellent reference on this topic. See chapter 7, Isolation (page 249).
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2