ttUtilGetErrorCount
Description
Retrieves the number of errors and warnings generated by the last call to the TimesTen C utility library functions, excluding ttUtilAllocEnv
and ttUtilFreeEnv
. Each of these functions can potentially generate multiple errors and warnings for a single call from an application. To retrieve all of these errors and warnings, the application must make repeated calls to ttUtilGetError
until it returns TTUTIL_NODATA
.
Required Privilege
None
Syntax
ttUtilGetErrorCount (ttUtilHandle handle,
unsigned int* errCount)
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Specifies the TimesTen utility library environment handle allocated using |
|
|
Indicates the number of errors and warnings generated by the last call, excluding |
Return Codes
The utility returns the following codes as defined in ttutillib.h
.
Code | Description |
---|---|
|
Returned upon success. |
|
Returned if an invalid utility library handle is specified. |
Example
This example retrieves the error and warning count information after calling ttDestroyDataStore
for the DSN named payroll
.
int rc;
unsigned int errCount;
ttUtilHandle utilHandle;
rc = ttDestroyDataStore (utilHandle, "DSN=payroll", 30);
if (rc == TTUTIL_SUCCESS)
printf ("Datastore payroll successfully destroyed.\n")
else if (rc == TTUTIL_INVALID_HANDLE)
printf ("TimesTen utility library handle is invalid.\n");
else
{
rc = ttUtilGetErrorCount(utilHandle, &errCount);
...
...
}
Notes
Each of the TimesTen utility library functions can potentially generate multiple errors and warnings for a single call from an application. To retrieve all of these errors and warnings, the application must make repeated calls to ttUtilGetError
until it returns TTUTIL_NODATA
.
See Also