#include <stdio.h>
#include <string.h>
#include "example_fcns.h"
#include "core11_structs.h"
#include "core11_cat.h"
const char *const description = "Demonstrates using an index for ordering";
{
OFFICE office_rec;
print_error (rc);
{
print_error (rc);
{
cursor, &office_rec, sizeof (office_rec), NULL);
print_error (rc);
printf ("%s\n", office_rec.name);
}
if (cursor)
{
}
}
return rc;
}
{
OFFICE office_rec;
print_error (rc);
{
for (int ii = 0; ii < (int) listSize; ii++)
{
strncpy (office_rec.name, officeList[ii], sizeof (office_rec.name));
hDB, TABLE_OFFICE, &office_rec, sizeof (office_rec), NULL);
print_error (rc);
}
else
print_error (rc);
}
return rc;
}
static const char *office_names[] = {"Seattle", "Boise", "San Francisco",
"Dallas", "Paris", "London",
"Dublin", "Zurich", "Madrid"};
#define RLEN(x) (sizeof (x) / sizeof (x[0]))
int main_core11 (int argc, const char *const *argv)
{
print_error (rc);
{
rc = exampleOpenEmptyDatabase (&hTFS, &hDB, "core11", core11_cat);
{
rc = insertOffices (hDB, office_names, RLEN (office_names));
}
{
printf ("\nAll Worldwide Offices\n");
display_offices (hDB);
}
exampleCleanup (hTFS, hDB);
}
return (int) rc;
}