Send feedback on this topic.
Teradata.Client.Provider
BeginTransaction(IsolationLevel,TdQueryBand) Method



Teradata.Client.Provider Namespace > TdConnection Class > BeginTransaction Method : BeginTransaction(IsolationLevel,TdQueryBand) Method
Isolation Level
The Query Bands that will be defined at the Transaction Level.
Begins an explicit transaction.
Syntax
'Declaration
 
Public Overloads Function BeginTransaction( _
   ByVal isolationLevel As IsolationLevel, _
   ByVal queryBand As TdQueryBand _
) As TdTransaction
'Usage
 
Dim instance As TdConnection
Dim isolationLevel As IsolationLevel
Dim queryBand As TdQueryBand
Dim value As TdTransaction
 
value = instance.BeginTransaction(isolationLevel, queryBand)
public TdTransaction BeginTransaction( 
   IsolationLevel isolationLevel,
   TdQueryBand queryBand
)
public:
TdTransaction^ BeginTransaction( 
   IsolationLevel isolationLevel,
   TdQueryBand^ queryBand
) 

Parameters

isolationLevel
Isolation Level
queryBand
The Query Bands that will be defined at the Transaction Level.
Exceptions
ExceptionDescription
Teradata does not directly support IsolationLevels. Therefore, the only acceptable value is System.Data.IsolationLevel.Serializable.
There is an open transaction and Teradata does not support parallel transactions or TdConnection is in the Closed state.
The Advanced SQL Engine does not support Query Bands.
Remarks

The queryBand parameter contains the Query Bands that will be defined at the Transaction level. For more information refer to Query Bands and Trusted Session in the Developer's Guide.

The Advanced SQL Engine supports Query Banding beginning with the 12.0 release. If an attempt is made to use Query Banding when connected to a Advanced SQL Engine prior to 12.0, a TdException will be thrown.

When the transaction is closed, the associated Transaction level Query Bands are no longer valid.

By default a TdConnection operates in auto-commit mode. This simply means that all SQL commands are immediately committed irrespective of the Session Mode (See Teradata SQL manuals).

To wrap two or more SQL statements in one transaction, call BeginTransaction to start an explicit transaction. Use the TdTransaction object to Commit or Rollback the transaction.

The Query Bands well be defined at the Transaction Level. If a Query Band is defined at both the Connection and Transaction levels, the Query Band at the Transaction Level has precedence.

Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdConnection Class
TdConnection Members
Overload List
TdQueryBand Class