FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Very strange indexing problem
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Very strange indexing problem
Posted: Sun Dec 07, 2014 06:26 PM

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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Very strange indexing problem
Posted: Sun Dec 07, 2014 07:35 PM

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
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Very strange indexing problem
Posted: Sun Dec 07, 2014 09:36 PM

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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Very strange indexing problem
Posted: Sun Dec 07, 2014 10:02 PM

Michel,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Very strange indexing problem
Posted: Mon Dec 08, 2014 09:17 AM

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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Very strange indexing problem
Posted: Mon Dec 08, 2014 04:16 PM

Can we see the code that creates the index?

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Very strange indexing problem
Posted: Mon Dec 08, 2014 11:20 PM

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
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Very strange indexing problem
Posted: Tue Dec 09, 2014 07:47 AM

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.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Very strange indexing problem
Posted: Tue Dec 09, 2014 08:29 AM
Michel sent me an example to review the problem but with FiveDBU it shows fine:

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Very strange indexing problem
Posted: Tue Dec 09, 2014 09:11 AM

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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Very strange indexing problem
Posted: Tue Dec 09, 2014 05:04 PM

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
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Very strange indexing problem
Posted: Tue Dec 09, 2014 05:34 PM

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
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Very strange indexing problem
Posted: Wed Dec 10, 2014 05:27 PM

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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: Very strange indexing problem
Posted: Wed Dec 10, 2014 05:59 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Very strange indexing problem
Posted: Thu Dec 11, 2014 08:27 AM

Michel,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com