Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Paradox Engine 3.0 for C - /* the setup.c and keyadd.c programs must be compiled and run */ http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
/* The SETUP.C and KEYADD.C programs must be compiled and run */
/* before this example can be executed. */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pxengine.h"

#define TABLENAME  "table"

char  commandline[128];   /* String buffer used to build command line. */

int main(void)
{
  PXCODE   pxErr;

  /* Attempt to initialize the Engine for local use. */

  pxErr = PXInit();
  if (pxErr != PXSUCCESS)
  {
    printf("%s\n", PXErrMsg(pxErr));
    return pxErr;
  }

  /* Show directory of table indexes before PXKeyDrop(). */

  strcpy(commandline, "dir ");
  strcat(commandline, TABLENAME);
  strcat(commandline, ".*");
  printf("--- Directory of table indexes before PXKeyDrop() --- \n");
    system(commandline);

  /* Remove all indexes, including secondary indexes. */

  if ((pxErr = PXKeyDrop(TABLENAME, 0)) != PXSUCCESS)
    printf("%s\n", PXErrMsg(pxErr));

  /* Show directory after dropping indexes. */

  printf("\n--- Directory of table indexes after PXKeyDrop() --- \n");
  system(commandline);

  PXExit();
  return(pxErr);
}
.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson