Index creation errors for DBase & Paradox

Hi all,

I am trying to define two or more index's for a Paradox 5.0 datafile.

If I define a datafile and a primary and secondary index:

with Table1 do
  begin

    Close;

    {define all fields in ORDER Datafile}
    with fieldDefs do
    begin
      Clear;
      Add('FIRSTNAME', ftString,  20, True);
      Add('LASTNAME',  ftString,  20, True);
      ................
      ...............
      Add('ORDERNUM',  ftInteger,  0, True);
      Add('STATUS',    ftString,  10, True);
    end;

   {Define index's}
    with IndexDefs do
    begin
      Clear;
      Add('ORDERNUM', 'ORDERNUM', [ixPrimary, ixUnique]);
      Add('LASTNAME', 'LASTNAME', []);
      Add('STATUS',   'STATUS',   []);
    end;
  end

The minute I try to 'CreateTable' I get :

'Demo1.exe' raised exception class EDBEngineError with message 'Number is
out of range'

I am creating datafiles and defining index's for many other datafiles
without a problem however I get this error on several data files and I have
no idea what's going on.
I am using Delphi 2 with the Delphi 3 DBE (I have Delphi 3 installed)

I have also have a huge problems trying to create DBASE files
programmatically and defining index's for them. Same example as above but
obviously for a DBASE file.

The message I get this time is :

'Demo1.exe' raised exception class EDBEngineError with message Invalid
Index Descriptor Client.MDX

This all seemed to work with the DBE that came with Delphi 2 but I have
changed a lot on my PC in the last week.

Any ideas anyone ?

TIA

--

Mark Hillsdon
____________________________________________________________________________
___

TransCom Software Inc.
Home of the WaveTools.

Email   : mv.hills...@transerve.com
URL     : www.transerve.com
____________________________________________________________________________
___