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


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

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

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 ?



Mark Hillsdon

TransCom Software Inc.
Home of the WaveTools.

Email   :
URL     :