Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

CTBase.Abort

Syntax

void Abort ( )

Parameters

This method has no parameters.

Description

Aborts a transaction started with a call to Begin. Note that Abort() does not free any locks. Locks acquired during the transaction need to be released with a call to Unlock() or CTRecord.UnlockRecord().

Return

None.

Example

ASession.Begin();

try

{

ADatabase.AddTable("custmast", "");

Console.Write("\nTable added to database.");

ASession.Commit();

}

catch (CTException err)

{

ASession.Abort();

Console.Write("\n\n{0} {1}",err.GetErrorCode(), err.GetErrorMsg());

}

See Also

Begin(), Commit(), IsTransActive()

TOCIndex