|  | 
			
				| Sets the transaction mode. | 
			
				|  | 
			
				| 
						
							|  | void SetTransMode ( enum eTransMode eTransMode
 )
 |  | 
			
				|  | 
			
				| 
						| Parameters |  | eTransMode |  | [in] A value of the 'eTransMode' enumeration. |  |  |  | Remarks |  | 
		
	|  | A transaction is only valid within one AnAcc-interface, you cannot use a transaction to modify multiple interfaces simultaneously. |  |  
							|  |  
							| See Also |  
							|  |  | 
			|  | 
			| Samples | 
			|  | 
			
				| 
						
							|  | C++ |  
							|  | bool bOK = true, bContinue = true;
 
 // Start the transaction
 pAnAcc->SetTransMode (tmBegin);
 
 while (bContinue)
 {
 // Perform some actions on the file, saving the result in bOK
 }
 
 if (bOK)        // If no errors occured, commit the transaction, saving all changes to disk.
 pAnAcc->SetTransMode (tmCommit);
 else            // If errors occured, roll back the transaction, discarding all changes.
 pAnAcc->SetTransMode (tmRollBack);
 
 
 |  | 
			
				| 
						
							|  | C# |  
							|  | bool bOK = true, bContinue = true;
 
 // Start the transaction
 oAnAcc.SetTransMode (eTransMode.tmBegin);
 
 while (bContinue)
 {
 // Perform some actions on the file, saving the result in bOK
 }
 
 if (bOK)        // If no errors occured, commit the transaction, saving all changes to disk.
 oAnAcc.SetTransMode (eTransMode.tmCommit);
 else            // If errors occured, roll back the transaction, discarding all changes.
 oAnAcc.SetTransMode (eTransMode.tmRollBack);
 
 
 |  | 
			
				| 
						
							|  | VBS |  
							|  | Dim bOK, bContinue
 bOK = True
 bContinue = True
 
 ' Start the transaction
 Call oAnAcc.SetTransMode(tmBegin)
 
 While bContinue
 ' Perform some actions on the file, saving the result in bOK
 Wend
 
 If bOK Then        ' If no errors occured, commit the transaction, saving all changes to disk.
 Call oAnAcc.SetTransMode(tmCommit)
 Else            ' If errors occured, roll back the transaction, discarding all changes.
 Call oAnAcc.SetTransMode(tmRollBack)
 End If
 
 
 |  | 
			
				| 
						
							|  | VB.NET |  
							|  | Dim bOK, bContinue As Boolean
 bOK = True
 bContinue = True
 
 ' Start the transaction
 oAnAcc.SetTransMode(eTransMode.tmBegin)
 
 While bContinue
 ' Perform some actions on the file, saving the result in bOK
 End While
 
 If bOK Then        ' If no errors occured, commit the transaction, saving all changes to disk.
 oAnAcc.SetTransMode(eTransMode.tmCommit)
 Else            ' If errors occured, roll back the transaction, discarding all changes.
 oAnAcc.SetTransMode(eTransMode.tmRollBack)
 End If
 
 
 |  |