Very strange indexing problem

User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Very strange indexing problem

Post 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.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Very strange indexing problem

Post by Antonio Linares »

Michel,

It looks as a corrupted index.

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

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Very strange indexing problem

Post 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?
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Very strange indexing problem

Post by Antonio Linares »

Michel,

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

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Very strange indexing problem

Post by driessen »

Antonio,

It is not so easy to reproduce a small example.

But I will send you some files by email.

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Very strange indexing problem

Post by James Bott »

Can we see the code that creates the index?
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Very strange indexing problem

Post 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
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Very strange indexing problem

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Very strange indexing problem

Post by Antonio Linares »

Michel sent me an example to review the problem but with FiveDBU it shows fine:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Very strange indexing problem

Post 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 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Very strange indexing problem

Post 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
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Very strange indexing problem

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Very strange indexing problem

Post 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.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Very strange indexing problem

Post by karinha »

João Santos - São Paulo - Brasil
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Very strange indexing problem

Post by Antonio Linares »

Michel,

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

Antonio Linares
www.fivetechsoft.com
Post Reply