Page 1 of 2

Very strange indexing problem

Posted: Sun Dec 07, 2014 6:26 pm
by driessen
Hello,

If I change a record in a DBF-file and I only change the date, then the record is shown twice after it is updated.

In the DBF-file, the record only appears once, but if I change from natural order to an index, then the record appears twice.
It only happens after the record has been changed.

Anyone any idea what might cause this problem?

Thanks.

Re: Very strange indexing problem

Posted: Sun Dec 07, 2014 7:35 pm
by Antonio Linares
Michel,

It looks as a corrupted index.

Have you try to delete the index and reindex it again ?

Re: Very strange indexing problem

Posted: Sun Dec 07, 2014 9:36 pm
by driessen
Antonio,

I deleted the CDX-file several times and then I reindexed, again and again. But nothing changes.

If the problem occurs, I reindex and all the data are correct again. But is my index made corrupt?

Re: Very strange indexing problem

Posted: Sun Dec 07, 2014 10:02 pm
by Antonio Linares
Michel,

Could you reproduce it on a small example that we may try ?

Re: Very strange indexing problem

Posted: Mon Dec 08, 2014 9:17 am
by driessen
Antonio,

It is not so easy to reproduce a small example.

But I will send you some files by email.

Thanks.

Re: Very strange indexing problem

Posted: Mon Dec 08, 2014 4:16 pm
by James Bott
Can we see the code that creates the index?

Re: Very strange indexing problem

Posted: Mon Dec 08, 2014 11:20 pm
by TimStone
I have had a similar observation, but I can't say it is related to a date field.

For some reason, with the past couple of releases of FWH, I am finding that some clients have indexes going bad. There have been no changes to the index format, which is:

DELETE FILE evecfx.cdx
oDB := tdata():new(, "evecfx",, .f. )
IF oDB:use()
oDB:createIndex( "evecfx", "cfvnsp",,, .t., 10 )
ENDIF
oDB:close()

Suddenly I have been getting calls from clients and they have to reindex frequently to eliminate problems just like stated above.

It is hard to get a small sample, but perhaps it would be possible to look at changes that might have been made in the indexing method for creation or updating. Maybe it is in the database object ?

Tim

Re: Very strange indexing problem

Posted: Tue Dec 09, 2014 7:47 am
by James Bott
If it is an index probem I would think that it would be a (x)Harbour issue rather than a Fivewin one. The (x)Harbour RDDs handle the building and use of indexes.

Maybe you could try compiling with an older version of FW/(x)Harbour.

Re: Very strange indexing problem

Posted: Tue Dec 09, 2014 8:29 am
by Antonio Linares
Michel sent me an example to review the problem but with FiveDBU it shows fine:

Image

Re: Very strange indexing problem

Posted: Tue Dec 09, 2014 9:11 am
by Antonio Linares
Ok, Michel just explained me how to reproduce it.

To me it seems as a RDD bug. We should try to reproduce it on a small example without FWH and report it to the Harbour developers list.

Michel, could you prepare such small example for me ? Please try to create the DBFs from the PRG itself, so we don't need to attach any files when reporting it.

many thanks :-)

Re: Very strange indexing problem

Posted: Tue Dec 09, 2014 5:04 pm
by TimStone
Antonio and James,

The problem started surfacing on my distribution copy of my application. That is the one that is built with xHarbour ( .com ) on a version that has been used for several years.

The problem has only been brought to my attention in recent months, so the only change made would be FWH. The current distribution uses FWH 14.09 with xHarbour ( .com ).

If it was an RDD problem, it would have shown up about two years ago.

I do use tData ( which draws from tDatabase ), and you have made changes in FWH to tDatabase ... so I would suspect perhaps therein lies the problem.

Tim

Re: Very strange indexing problem

Posted: Tue Dec 09, 2014 5:34 pm
by Antonio Linares
Tim,

As far as I know Michel is not using Class TDataBase.

I have reported this problem to Viktor Szakáts and I have sent him Michel files, so he may be able to check it for himself and asked his help to report the bug in case he also confirms that looks like a bug.

I have been able to reproduce Michel's bug using FiveDBU only, so to me it seems as a RDD bug that somehow is manifesting now.

Re: Very strange indexing problem

Posted: Wed Dec 10, 2014 5:27 pm
by driessen
Antonio,

Any news yet concerning my problem?

I did some more test today.

As you know until a few months ago, I was using xHarbour builder.
So today I tried to rebuild my application using xHarbour builder.

Also in this version, the same problem is happening.

I just wanted to let you know.

Re: Very strange indexing problem

Posted: Wed Dec 10, 2014 5:59 pm
by karinha

Re: Very strange indexing problem

Posted: Thu Dec 11, 2014 8:27 am
by Antonio Linares
Michel,

No more news from Viktor, I am going to email him again now