Source code for the RDM core12 example. More...
#include <stdio.h>
#include <string.h>
#include "rdm.h"
#include "core12_db_structs.h"
#include "core12_db_cat.h"
Macros | |
#define | print_error(rc) print_errorEx (rc, __FILE__, __LINE__) |
Standard error print macro. | |
Functions | |
void | print_errorEx (RDM_RETCODE rc, const char *file, int line) |
Standard error print format for popcorn examples. More... | |
RDM_RETCODE | openEmptyDatabase (RDM_DB *pDB, const char *dbName) |
Initialize the RDM runtime library for use in the core12 example. More... | |
RDM_RETCODE | display_offices (RDM_DB hDB) |
Display the contents of the database. More... | |
int | main (void) |
Source code for the RDM core12 example.
RDM_RETCODE display_offices | ( | RDM_DB | hDB | ) |
Display the contents of the database.
This function displays the contents of the database. Exclusve mode does not require database locks or transactions.
[in] | hDB | Database handle to be used |
RDM_RETCODE openEmptyDatabase | ( | RDM_DB * | pDB, |
const char * | dbName | ||
) |
Initialize the RDM runtime library for use in the core12 example.
This function initializes the RDM Transactional File Server (TFS) to use the EMBEDED TFS implementation. It also allocates a database handle and opens the "core12" database in exclusive mode. Exclusve mode does not require database locks or transactions.
[out] | pDB | Pointer to the RDM database handle |
[in] | dbName | Database Name |
void print_errorEx | ( | RDM_RETCODE | rc, |
const char * | file, | ||
int | line | ||
) |
Standard error print format for popcorn examples.
This demonstrates the usage of the rdm_retcodeGetName() and rdm_retcodeGetDescription() functions.
[in] | rc | RDM_RETCODE to analyze |
[in] | file | Sourcec filename |
[in] | line | Lineno in source file |