home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windoware
/
WINDOWARE_1_6.iso
/
source
/
tpwpxeng
/
tblmaxsz.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-07-22
|
796b
|
33 lines
program TblMaxSz;
uses PXEngine, WinCrt;
type NameString = pChar;
const TableName = 'Table';
MaxSize = 128; (* in Megabytes *)
NFields = 5;
Fields: Array[1..NFields] of NameString =
('Numeric Field', 'Alpha Field', 'Date Field', 'Currency Field',
'Short Field');
Types: Array[1..NFields] of NameString =
('N', 'A50', 'D', '$', 'S');
var PxErr: Integer;
procedure PX(Code : integer);
begin
writeln(PXErrMsg(Code));
end;
begin
PX(PXWinInit('MyApp', pxShared));
(* Set maximum table size before creating table *)
PxErr := PXTblMaxSize(MaxSize);
if PxErr <> PxSuccess then
Writeln(PxErrMsg(PxErr));
PX(PXTblCreate(TableName, NFields, Fields, Types));
PX(PXExit);
end.