home *** CD-ROM | disk | FTP | other *** search
- program GetAlpha;
- uses PXEngine;
-
- const TableName = 'Table';
-
- var PxErr: Integer;
- TblHandle: TableHandle;
- RecHandle: RecordHandle;
- FldHandle: FieldHandle;
- AValue: String;
-
- begin
- PX(PXInit);
- PX(PXTblOpen(TableName, TblHandle, 0, False));
- PX(PXRecBufOpen(TblHandle, RecHandle));
- PX(PXFldHandle(TblHandle, 'Alpha Field', FldHandle));
- PX(PXRecGet(TblHandle, RecHandle));
-
- (* Get an alphanumeric value out of a field *)
- PxErr := PXGetAlpha(RecHandle, FldHandle, AValue);
- if PxErr <> PxSuccess then
- Writeln(PxErrMsg(PxErr))
- else Writeln('Field number ', FldHandle, ' contents: ', AValue);
-
- PX(PXRecBufClose(RecHandle));
- PX(PXTblClose(TblHandle));
- PX(PXExit);
- end.