home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include "pxengine.h"
-
- #define TABLENAME "table"
-
- FIELDHANDLE fldHandles[] = { 1, 2 };
-
- #define NFIELDS (sizeof(fldHandles) / sizeof(FIELDHANDLE))
-
- int main(void)
- {
- int pxErr;
-
- PXInit();
-
- /* Create an index on fields 1 and 2 */
- if ((pxErr = PXKeyAdd(TABLENAME, NFIELDS, fldHandles, PRIMARY))
- != PXSUCCESS)
- printf("%s\n", PXErrMsg(pxErr));
-
- PXExit();
- return(pxErr);
- }