#include <stdio.h>
#include <string.h>
#include "example_fcns.h"
#include "core13_structs.h"
#include "core13_cat.h"
const char *const description = "Demonstrates using an index for ordering";
{
OFFICE office_rec;
{
puts("The OFFICE table is not available for READ because of a WRITE lock.");
}
else
{
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;
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);
}
return rc;
}
static const char *office_names[] = {"Seattle", "Boise", "San Francisco",
"Dallas"};
#define RLEN(x) (sizeof (x) / sizeof (x[0]))
int main_core13 (int argc, const char *const *argv)
{
print_error (rc);
{
rc = exampleOpenEmptyDatabase (&hTFS, &hDB1, "core13", core13_cat);
{
rc = exampleOpenNextDatabase (hTFS, &hDB2, "core13", core13_cat);
{
print_error (rc);
}
}
{
print_error (rc);
{
rc = insertOffices (hDB1, office_names, RLEN (office_names));
{
printf ("\nDisplaying Offices using database handle #1.\n");
rc = display_offices (hDB1);
}
printf ("\nDisplaying Offices using database handle #2.\n");
rc = display_offices (hDB2);
print_error (rc);
{
printf ("\nDisplaying Offices using database handle #2.\n");
rc = display_offices (hDB2);
}
}
exampleCleanup2 (hTFS, hDB1, hDB2);
}
}
return rc;
}