#include "transactions_structs.h"
#include "transactions_cat.h"
#include <stdio.h>
#include <stdlib.h>
int32_t main_transactionsTutorial (int32_t argc, const char *const *argv)
{
{
{
{
}
{
int32_t iTrans;
int32_t iCnt;
{
{
printf ("Can't open the transaction database.");
}
}
{
db, tables,
RDM_LEN (tables), NULL, 0, NULL);
}
{
{
}
else
{
}
}
for (iTrans = 0; iTrans < 10 && rc ==
sOKAY; iTrans++)
{
db, tables,
RDM_LEN (tables), NULL, 0, NULL);
{
for (iCnt = 0; iCnt < 10 && rc ==
sOKAY; iCnt++)
{
INFO sInfo;
sprintf (
sInfo.mystr, "Inserted %d Transaction %d", iCnt,
iTrans);
db, TABLE_INFO, &sInfo, sizeof (sInfo), NULL);
}
{
}
else
{
}
}
}
{
}
{
iCnt = 0;
{
{
INFO sInfo;
cursor, &sInfo, sizeof (sInfo), NULL);
{
printf ("%s\n", sInfo.mystr);
}
iCnt++;
}
{
}
}
}
printf ("\n");
{
printf ("I found %d INFO records in the database\n", iCnt);
}
}
}
}
{
printf (
"There was an error in this Tutorial (%s - %s)\n",
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}