Index problem

Index problem

Postby driessen » Fri Jun 06, 2014 8:05 am

I have a customer who often gets this error :

hb_cdxPageSeekKey: wrong parent key.hb_cdxPageSeekKey: wrong parent key.

What causes this error? And how can it be prefended?

Thanks a lot in advance.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Index problem

Postby Antonio Linares » Fri Jun 06, 2014 9:33 am

Michel,

I would say that it is a corrupted index.

Tell your customer never to turn off the computer suddenly. Does he has power supply problems ?
regards, saludos

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

Re: Index problem

Postby driessen » Fri Jun 06, 2014 11:02 am

Antonio,

The error occurs now and then. But if the application is started again, everything is ok. But after a while, the problem occurs again.
It has nothing to do with shutting down the PC suddenly.

Very strange.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Index problem

Postby Antonio Linares » Fri Jun 06, 2014 1:48 pm

Michel,

Then it points to memory corruption and it could be a xharbour problem (as FWH does not manage the RDD internals at all).

If you rebuild your app using Harbour then we could know it for sure.

FYI, Colin from Australia (in these forums) has successfully migrated from xHarbour (.com) to Harbour in three days and now he is using Visual Studio also (he finished his migration yesterday, as I have been assisting him) :-)
regards, saludos

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

Re: Index problem

Postby karinha » Fri Jun 06, 2014 3:00 pm

hello, I do so and I have no problems.

Code: Select all  Expand view

FUNCTION ReIndPack( lPack, lIndCep, oMostraIndCep, olPack, oMeter1, ;
                           oMeter2, oMeter3 )

    LOCAL Del_Indice

    DEL_INDICE := DIRECTORY( "*.CDX" )

    FOR I = 1 TO LEN( Del_Indice )
       FERASE( DEL_INDICE[I][1] )
    NEXT I

    IF NetUse( "AGENDGRP", .F. )

        IF lPack = .T.

            MsgRun( "Borrando Registros Excluidos...", ;
                    "Por Favor, Espere!"             , ;
                    { || __DbPack() } )

        ENDIF

        oMeter1:nTotal = RecCount()

        INDEX ON Field->GTE_CODIGO            TAG CODIGO TO   AGENDGRP    ;
              FOR !DELETED()                                              ;
              EVAL ( oMeter1:Set( RecNo() ), CursorWait(), SysRefresh() ) ;
              EVERY 10


        INDEX ON Field->GTE_NOMBRE             TAG NOMBRE TO   AGENDGRP   ;
              FOR !DELETED()                                              ;
              EVAL ( oMeter1:Set( RecNo() ), CursorWait(), SysRefresh() ) ;
              EVERY 10

        DbCloseAll()

    ENDIF

    ...

RETURN NIL
 


Regards,
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Index problem

Postby Antonio Linares » Fri Jun 06, 2014 5:30 pm

João,

Do you use Harbour or xHarbour ?
regards, saludos

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

Re: Index problem

Postby karinha » Fri Jun 06, 2014 5:54 pm

xHarbour, master.

xHarbour 1.2.3 Intl. (SimpLex) (Build 20130422)
Copyright 1999-2013, http://www.xharbour.org http://www.harbour-project.org/

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Index problem

Postby Antonio Linares » Fri Jun 06, 2014 7:02 pm

It could be also interesting if other xHarbour users report here if they have ever seen that kind of error also.

To me its look like memory corruption, so we should consider all possibilities where such corruption could come from.
regards, saludos

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

Re: Index problem

Postby driessen » Sat Jun 07, 2014 9:46 am

Antonio,

I want to give it a try to transfer my apps from xHarbour Builder to Harbour but I have never used Harbour before. I have always been using xHarbour Builder, which is quite easy to use.

I found a lot of BAT-files in the samples folder. Which one do I have to use?

I have more than 30 PRG-files, a few RC-files and some extra libs. How do I put them into one of the BAT-files?

I can send you a XBP-file from xHarbour Builder. Can you change into a BUILD(H).BAT?

Thank you so much for any help.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Index problem

Postby Antonio Linares » Sat Jun 07, 2014 12:27 pm

Michel,

Do you want to use Borland or Microsoft ?

Just send me your XBP file and I will build a makefile for you, and just calling a little bat file that I will provide you,
you will have everything built and running so easily :-)
regards, saludos

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

Re: Index problem

Postby driessen » Sat Jun 07, 2014 2:00 pm

Antonio,

I just send you my XBP-file by e-mail.

Thanks a lot.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Index problem

Postby Antonio Linares » Sat Jun 07, 2014 2:27 pm

Michel,

Please better do:

dir *.prg > files.txt

and email files.txt, thanks
regards, saludos

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

Re: Index problem

Postby Antonio Linares » Sat Jun 07, 2014 3:32 pm

Michel,

Already sent to your email, I wait for your feedback.

If you don't mind it, I would like to post it here to help others (unless you don't want it, which I would fully respect)
regards, saludos

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

Re: Index problem

Postby driessen » Sat Jun 07, 2014 6:49 pm

Antonio,

No problem. You can post everything here of course. Glad to help others if necessary.

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Index problem

Postby Antonio Linares » Sat Jun 07, 2014 8:08 pm

Michel,

Thanks. Here I copy it in case someone else want to use it:

go.bat
Code: Select all  Expand view
if not exist obj md obj
c:\bcc582\bin\make -ftest.mak


test.mak
Code: Select all  Expand view
#Borland make for Michel, (c) FiveTech Software 2014

HBDIR=c:\harbour
BCDIR=c:\bcc582
FWDIR=c:\fwh

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\
.path.rc  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG =        \
.\BEHAGEN1.PRG \
.\BEHAGEN2.PRG \
.\BEHBOEK1.PRG \
.\BEHBOEK2.PRG \
.\BEHDOSS1.PRG \
.\BEHDOSS2.PRG \
.\BEHINTRX.PRG \
.\BEHPAAND.PRG \
.\BEHPARAM.PRG \
.\BEHPRARC.PRG \
.\BEHSOOR1.PRG \
.\BEHSOOR2.PRG \
.\BEHUSER.PRG  \
.\DOCWP1.PRG   \
.\DOCWP2.PRG   \
.\FGEGTL1.PRG  \
.\GEGTL2.PRG   \
.\JUDA.PRG     \
.\MAKEIND.PRG  \
.\RAPAGPRE.PRG \
.\RAPDOSBH.PRG \
.\STJUDA.PRG   \
.\TINATIVO.PRG \
.\Z-ERROR1.PRG \
.\Z-PRINT.PRG  \
.\Z-RPREV.PRG  \
.\Z-TGET.PRG   \
.\Z-WBROWS.PRG

OBJ = $(PRGS:.PRG=.OBJ)
OBJS = $(OBJ:.\=.\obj\)

PROJECT  : JUDA.EXE

JUDA.EXE : $(OBJS) JUDA.RES
   echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo $(OBJS), + >> b32.bc
   echo juda.exe, + >> b32.bc
   echo juda.map, + >> b32.bc
   echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
   echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\hblang.lib + >> b32.bc
   echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
   echo $(HBDIR)\lib\rddntx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddfpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
   echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
   echo $(HBDIR)\lib\hbwin.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcpage.lib + >> b32.bc
   echo $(HBDIR)\lib\hbct.lib + >> b32.bc
   echo $(HBDIR)\lib\png.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcplr.lib + >> b32.bc
   echo $(HBDIR)\lib\xhb.lib + >> b32.bc
   echo $(HBDIR)\lib\hbzlib.lib + >> b32.bc

   rem Uncomment these two lines to use Advantage RDD
   rem echo $(HBDIR)\lib\rddads.lib + >> b32.bc
   rem echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc

   IF EXIST juda.res echo juda.res >> b32.bc
   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
   del b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /L /N /W /V /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

juda.res : juda.rc
  $(BCDIR)\bin\brc32.exe -r juda.rc
regards, saludos

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

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 24 guests