VistaDB 5






BeginTransaction() Method
Starts a database transaction on the current connection. Because BeginTransaction creates a new transaction and associates it with the current connection that created it, you can simplify your code by using this method rather than allocating a new transaction and then assigning it manually. Class VistaDBConnection
Syntax
'Declaration
 
Public Overloads Shadows Function BeginTransaction() As VistaDBTransaction
'Usage
 
Dim instance As VistaDBConnection
Dim value As VistaDBTransaction
 
value = instance.BeginTransaction()
public new VistaDBTransaction BeginTransaction()
public function BeginTransaction(): VistaDBTransaction; 
public hide function BeginTransaction() : VistaDBTransaction;
public: new VistaDBTransaction* BeginTransaction(); 
public:
new VistaDBTransaction^ BeginTransaction(); 

Return Value

An object representing the new transaction.
Example
<<code lang="C#">> VistaDBTransaction trans = conn.BeginTransaction(); <</code>> Is the same as: <<code lang="C#">> VistaDBTransaction trans = new VistaDBTranscation(); trans.Connection = conn; trans.Begin(); <</code>>
Requirements

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

See Also