home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
library
/
windows
/
pdoxeng
/
fldname.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-04-11
|
720b
|
33 lines
program FieldName;
uses PXEngine, WinCrt;
const TableName = 'Table';
type NameString = array[0..24] of char;
var PxErr: Integer;
TblHandle: TableHandle;
FldHandle: FieldHandle;
FldName: NameString;
procedure PX(Code : integer);
begin
writeln(PXErrMsg(Code));
end;
begin
PX(PXWinInit('MyApp', pxShared));
FldHandle := 1;
PX(PXTblOpen(TableName, TblHandle, 0, False));
(* Get field name for first field in table *)
PxErr := PXFldName(TblHandle, FldHandle, 20, @FldName);
if PxErr <> PxSuccess then
Writeln(PxErrMsg(PxErr))
else Writeln('Field handle ',FldHandle, ' has field name ', FldName);
PX(PXTblClose(TblHandle));
PX(PXExit);
end.