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 - <b>syntax:</b> int pxkeyadd(char *tblname, int nflds, http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Syntax: int PXKeyAdd(char *tblName, int nFlds,
                     FIELDHANDLE *fldHandles, int mode)

Args:  tblname        - string containing name of table without extension
       nFlds          - number of fields in key  (1 if secondary)
       fldhandles     - although specified as an array of integer
                        fieldhandles, only the first element is used.
       mode           - type of index; PRIMARY SECONDARY INCSECONDARY

Returns: PXSUCCESS (0) or error number

Synopsis: Creates an index for table named by tblname.  Must be called
   before the table is opened. Primary keys must be unique and PXKeyAdd
   will silently delete records with duplicate keys. Only the first such
   record will be preserved. Blob fields cannot be used in indices.

   While PXKeyAdd can be used to create a primary index consisting of
   multiple contiguous fields, it is probably a better practice to use
   composite keys instead (if backward compatibility is not an issue).

   Note that SECONDARY indices are not maintained (as are INCSECONDARY)
   and thus become obsolete when a table is changed.

   To create a case-insensitve or composite index fldHandle must specify a
   handle returned from PXKeyMap.

See Also: Example PXKeyMap PXKeyQuery

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