home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include "pxengine.h"
-
- #define TABLENAME "table"
-
- int main(void)
- {
- FIELDHANDLE fldHandle;
- TABLEHANDLE tblHandle;
- char fieldType[BUFSIZ];
- int pxErr;
-
- PXInit();
- PXTblOpen(TABLENAME, &tblHandle, 0, 0);
- PXFldHandle(tblHandle,"Currency Field", &fldHandle);
-
- /* Get field type from field handle */
- if ((pxErr = PXFldType(tblHandle, fldHandle, BUFSIZ, fieldType))
- != PXSUCCESS)
- printf("%s\n", PXErrMsg(pxErr));
- else
- printf("Field handle %d has field type of %s\n",
- fldHandle, fieldType);
-
- PXTblClose(tblHandle);
- PXExit();
- return(pxErr);
- }