Home > Archive > Getting Started with dBASE > October 2006 > Corrupt Index or corrupty DBASE 2.61









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Corrupt Index or corrupty DBASE 2.61
Kees Blokker

2006-10-25, 7:23 am

Hello. moving from 5.7 to 2.6. I have a file with fields First_name, last_name, other_name and titles. And created a index tag
Lastname-" "-firstname-othername-left(titles,40), This worked perfect in 5.7, but now I notice that Dbase+lus just does not sort on 3rd and 4th fiieldname. I tried all sorts of combinations, but it just does not makes a correct index. I have checked and
unchecked autonullfields option in the desktop properties. Moving back to Visual 5.7 shows that I could not open the files anymore. Had to copy them to type DBmemo3 and now the index in 5.7 has the same problem. In both 5.7 and 2.61 the language drivers a
re Dbase NLcp 437.
I have detached the MDX file and build a new one, but the sorting remains the same.
What causes this problem and how can I solve it?
Thanks from a sunny Holland
Kees

Gerald Lightsey

2006-10-25, 7:23 am

On Wed, 18 Oct 2006 06:52:37 -0400, in the dbase.getting-started group,
Kees Blokker said...
> Hello. moving from 5.7 to 2.6. I have a file with fields First_name,
> last_name, other_name and titles. And created a index tag
> Lastname-" "-firstname-othername-left(titles,40), This worked perfect
> in 5.7, but now I notice that Dbase+lus just does not sort on 3rd
> and 4th fiieldname. I tried all sorts of combinations, but it just
> does not makes a correct index. I have checked and unchecked
> autonullfields option in the desktop properties. Moving back to
> Visual 5.7 shows that I could not open the files anymore. Had to copy
> them to type DBmemo3 and now the index in 5.7 has the same problem.
> In both 5.7 and 2.61 the language drivers are Dbase NLcp 437.
> I have detached the MDX file and build a new one, but the sorting
> remains the same.
> What causes this problem and how can I solve it?
> Thanks from a sunny Holland
> Kees


Are you remembering to standardize the names by running them through
either the upper() or lower() function?

Try something like this in the command window. It SHOULD demonstrate
that PLUS continues to apply the - operator in string concatenation as
it always has.

Gerald

first_name = "George "
middle_name = "Walker "
last_name = "Bush "
suffix = " "
key = upper(last_name - first_name - middle_name - suffix)
?len(key)
// 40
?key
//BUSHGEORGEWALKER
Kees Blokker

2006-10-25, 7:23 am

Gerald Lightsey Wrote:

> either the upper() or lower() function?
>
> Try something like this in the command window. It SHOULD demonstrate
> that PLUS continues to apply the - operator in string concatenation as
> it always has.
>
> Gerald
>
> first_name = "George "
> middle_name = "Walker "
> last_name = "Bush "
> suffix = " "
> key = upper(last_name - first_name - middle_name - suffix)
> ?len(key)
> // 40
> ?key
> //BUSHGEORGEWALKER


Hello, I went back to Dbase IV, re-created the files, appended them from V5.7, rebuilded the indexes and all seems to work o.k. again. Still cannot understand that the indexes ignores empty fields. So, for now everything is o.k. again.
Kees Blokker
Kees Blokker

2006-10-25, 7:23 am

Gerald Lightsey Wrote:

> Are you remembering to standardize the names by running them through
> either the upper() or lower() function?
>
> Try something like this in the command window. It SHOULD demonstrate
> that PLUS continues to apply the - operator in string concatenation as
> it always has.
>
> Gerald
>
> first_name = "George "
> middle_name = "Walker "
> last_name = "Bush "
> suffix = " "
> key = upper(last_name - first_name - middle_name - suffix)
> ?len(key)
> // 40
> ?key
> //BUSHGEORGEWALKER


Hello Gerald, thanks for your help. I did the small program and it runs as you describe, I only got a ?len(key) of 20.
If I build an index on the index builder of Visual db 5.7 and evaluate this, I does not return a complete string if one field is empty. It just ignores the empty field and the fields after that in the index string. I never had this problem. Everything alw
ays worked fine. I now went back to Dbase IV, re-created the files, appended them from V5.7, rebuilded the indexes and everything works fine again. If I re-index in V5.7, it again skips empty fields in the index string. So, I skip re-indexing, until I kno
w what is causing this.
Again thanks, I learned something of your syntaxis. Regards Kees
Gerald Lightsey

2006-10-25, 7:23 am

On Fri, 20 Oct 2006 04:34:05 -0400, in the dbase.getting-started group,
Kees Blokker said...
> Gerald Lightsey Wrote:
>
>
> Hello Gerald, thanks for your help. I did the small program and it runs
> as you describe, I only got a ?len(key) of 20.
> If I build an index on the index builder of Visual db 5.7 and evaluate
> this, I does not return a complete string if one field is empty. It just
> ignores the empty field and the fields after that in the index string.
> I never had this problem. Everything always worked fine. I now went back
> to Dbase IV, re-created the files, appended them from V5.7, rebuilded the
> indexes and everything works fine again. If I re-index in V5.7, it again
> skips empty fields in the index string. So, I skip re-indexing, until I
> know what is causing this.
> Again thanks, I learned something of your syntaxis. Regards Kees


If you are getting 20 as the result of ?len(key) and you used my example
which contained four strings each with a length of 10 then there is
definitely something wrong. I used PLUS 2.61 in my example to make sure
I was using the same version you are using. If the empty string was the
reason for the problem then ?len(key) would return 30 not 20.

Although I have no specific recommendations for a next step for you this
problem needs to be resolved because it may be leading to index keys
with variable lengths which is always a problem to be avoided.

Gerald
Kees Blokker

2006-10-28, 7:16 pm

Hello Gerald,
As I said it works o.k. again. Many thanks for our hints.
Kees from a rainy Holland

Gerald Lightsey Wrote:

> If you are getting 20 as the result of ?len(key) and you used my example
> which contained four strings each with a length of 10 then there is
> definitely something wrong. I used PLUS 2.61 in my example to make sure
> I was using the same version you are using. If the empty string was the
> reason for the problem then ?len(key) would return 30 not 20.
>
> Although I have no specific recommendations for a next step for you this
> problem needs to be resolved because it may be leading to index keys
> with variable lengths which is always a problem to be avoided.
>
> Gerald


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com