Re: TZF - Incorrect Index Length
"William T. Marchant" <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Marie and all,
I apologise for the delay in further investigation. I was occupied with other
things for a few days.
Acting on the hint that something was wrong with the data, I put my data base
into JTBrowse. I deleted all the records containing e-mail addresses. The same index
error reported before occurred.
Then I used JTBrowse again, but this time I deleted all the records without
e-mail addresses. Using this modified file in my main program, it ran. All the indexes
came up correctly.
My conclusion: There is a problem in the data. Now all I have to do is go
through all the records that dont have e-mail addresses, and find out which one (or
ones) are the culprits.
Bill.
Marie Vihonsky wrote:
> Hi Bill,
>
> Now that scenario possibly points to 'data' within the field - some
> ascii character which is terminating the field early. This is just a
> guess though.
>
> Marie
>
> William T. Marchant wrote:
> > Marie,
> > You may be right about having to put the keys in the code, although I have
> > never done it since DOS days. Here is the present state of my investigation:
> > I constructed a completely independent version of my data file. Using
> > JTBrowse, I populated it from my .dbf file which I made earlier using Quattro Pro.
> > In my program the data file, and all five of its its indexes worked. I added new
> > data and tested them all. I then deleted the .mdx file to test the ability of the
> > program to generate a new index file. It failed to do so, giving me the error box
> > which I have already quoted. Very frustrating!!!
> > Bill
> >
> > Marie Vihonsky wrote:
> >
> >
> >>Hi Bill,
> >>
> >>First, are you sure that the total length of the key is not greater than
> >>100 characters using the 40 char field?
> >>
> >>You might try removing the tzdbf database from the form and then re-add
> >>it. I still think that the field length is being retained somewhere.
> >>
> >>I have found that coding the index keys within the program - not the
> >>Object Inspector - allows for changing stuff better. Why? I don't know,
> >>but it does. Must have something to do with what Delphi does in the
> >>background for maintaining code.
> >>
> >>Marie
> >>
> >>William T. Marchant wrote:
> >>
> >>>Philip,
> >>> Thanks for the response. I intend to keep checking till I find it. One
> >>>error in my last message. I am using Topaz 7.51, not 7.1.
> >>>Bill
> >>>
> >>>Philip Kidder wrote:
> >>>
> >>>
> >>>
> >>>>Bill,
> >>>>
> >>>>I reread your email and noticed that you did delete the index file. You need
> >>>>to make sure that the size in the field definitions of the database is
> >>>>correct and shows 40 not 25.
> >>>>
> >>>>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
==^================================================================