Re: TZF - Incorrect Index Length

Philip Kidder <[email protected]>
Newsgroups gmane.comp.lang.delphi.topaz
Message-ID <[email protected]>
Bill,

One way I have seen this error it's because the length of a data field has
changed from when the index was defined. Another is when I generate a key
that is the wrong size and try to use it.  I suggest deleting the index and
then recreating it.

The index file (.ndx or mdx) needs to keep track of what the size of a key
is so all the necessary bookkeeping of and index file will work correctly.
Just think of the mess if variaable length keys were allowed in a index
file.  Adding are retrieving keys would be impossible.  So when the length
of a key does not match what is stored in the index file Topaz generates an
Incorrect Index Length error.

Phil

----- Original Message -----
From: "William T. Marchant" <[email protected]>
To: <[email protected]>
Sent: Friday, February 21, 2003 8:49 PM
Subject: Re: TZF - Incorrect Index Length


> Hi,
>         Thanks for the suggestion Marie.  I tried it again, and it still
> doesn't work.  Further data might be helpful.  Using Topaz 7.1 and
> Delphi 5
> 1.  Deleted the .mdx file
> 2.  In the object inspector selected the IndexList edito.
> 3.  Deleted all five of the index definitions.
> 4.  Redefined them all
> 5.  Deactivated then reactivated the file in the object inspector.
> 6.  F9 to run the program
> 7.  Error Message "Error 266 (invalid size)  Incorrect length: NMust be
> 1 to
> 100. .\memberlist.mdx (Open Index/Set_Index_To)"
>
> I then repeated 1, 2, 3, Redefined only the first four indexes, (Omiting
> the
> e-mail-address index). Repeated 5, 6.
> Program ran just fine without the fifth (e-mail address) index.
>
> Inspection of both .dbf files structure using EGBrowse, shows them to be
> identical.
>
> I have run all five indexes with both original data and repopulated
> data.  The
> .mdx files produced can be seen in a binary inspection.  The Original
> Data
> file has 40 byte entries in the e-mail index.  The indexes all work.
> The
> Repopulated Data file shows 25 byte spaces for the e-mail index, but
> there is
> no data in the spaces.  The program refuses to run without proper
> indexes, and
> I get the error quoted above.
> Bill.
>
> Marie Vihonsky wrote:
>
> > Hi Bill,
> >
> > Try 'inactivating' and 'activating' the database in the Object Inspector
> > so that the field sizes get updated in the program.
> >
> > Marie
> >
> > William T. Marchant wrote:
> > > Hi all,
> > >         I have a Tzdbf file using five indexes.  It has been running
> > > sucessfully for over two years.  Recently I repopulated an empty copy
of
> > > the .dbf file with new data.
> > >         Using Eitan's EGBrowse (a terrific program by the way!) I
> > > appended records from a .dbf file made using Quattro Pro, and saving
the
> > > data as a .dbf.
> > >         Four of the indexes work.  The fifth, using a field of e-mail
> > > addresses reports that the index length is incorrect.  The field is 40
> > > characters wide.  One of my searches revealed that the width expected
is
> > > 25 characters.  Yet the field in the file made with Quattro is 40
chars
> > > wide, and the field in the resulting .dbf made with EGBrowse is also
40
> > > chars wide.
> > >         I am at a loss to discover my error (I presume it is mine),
but
> > > I cannot find it.  Does anyone have suggestions about where to look?
> > > Bill Marchant
> > >
> > >
> > >
> >
>
>

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]

TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
==^================================================================
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.