Products Support Documentation Download
Macros | Functions
Core02.c File Reference

Source code for the RDM core02 example. More...

#include <stdio.h>
#include <string.h>
#include "rdm.h"
#include "core02_db_structs.h"
#include "core02_db_cat.h"

Macros

#define PRINTERROR(rc)
 Standard error print format for popcorn examples. More...
 

Functions

RDM_RETCODE insertOneRow (RDM_DB hDB)
 Insert one row into the core02 database. More...
 
RDM_RETCODE readAllRows (RDM_DB hDB)
 Reads and displays all rows in the core02 database. More...
 
int main (void)
 Main function for Core02 example. More...
 

Detailed Description

Source code for the RDM core02 example.

Macro Definition Documentation

◆ PRINTERROR

#define PRINTERROR (   rc)
Value:
fprintf(stderr, "%s:%d:0: error: %d (%s): %s\n", __FILE__, __LINE__, rc, \
rdm_retcodeGetName(rc), rdm_retcodeGetDescription(rc));

Standard error print format for popcorn examples.

This macro demonstrates the usage of the rdm_retcodeGetName() and rdm_retcodeGetDescription() functions

Function Documentation

◆ insertOneRow()

RDM_RETCODE insertOneRow ( RDM_DB  hDB)

Insert one row into the core02 database.

This function adds one more row to the core02 database. The row contains only a non-indexed character string.

Returns
Returns an RDM_RETCODE code (sOKAY if successful)
Parameters
[in]hDBRDM db handle with the database open

◆ main()

int main ( void  )

Main function for Core02 example.

The function initializes the RDM environment and runs the create, read operations.

Returns
Returns the RDM_RETCODE on exit.

◆ readAllRows()

RDM_RETCODE readAllRows ( RDM_DB  hDB)

Reads and displays all rows in the core02 database.

This function reads and displays all rows in the core02 database. Each time the core02 program is executed, an additional row will be added to the database.

Returns
Returns an RDM_RETCODE code (sOKAY if successful)
Parameters
[in]hDBRDM db handle with the database open