Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

Error Handling

Most c-treeDB .NET API functions return an error status to indicate if a particular function operation succeeded or not. Most c-treeDB .NET API methods will also keep the last error status, if the function operation failed. The last error status can be manipulated with the following methods:

GetError() retrieves the last error status. If a function succeeds, the success status is not kept by the c-treeDB .NET API.

SetError() sets the last error status, overwriting any previous error status kept by the c-treeDB .NET API.

ClearError() clears the last error status.


// clear the error if error is INOT_ERR

// Recobj is a CTRecord object

if (Recobj.GetError() == INOT_ERR)

{

Recobj.ClearError();

}

TOCIndex