what does this mean : Unrecoverable error 9201: hb_cdxPageSeekKey: wrong parent key

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

what does this mean : Unrecoverable error 9201: hb_cdxPageSeekKey: wrong parent key

Post by AUGE_OHR »

hi,
i got this Error,
Unrecoverable error 9201: hb_cdxPageSeekKey: wrong parent key.
Called from DBSEEK(0)
Called from SEEKKEYINPUT(2779) in HBTEL.PRG
Called from (b)MAIN(290) in HBTEL.PRG
Called from _HMG_GRIDONCLICKANDONKEYEVENT(703) in source\h_grid.prg
Called from EVENTPROCESS(283) in source\h_EventCB.prg
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(6269) in source\h_windows.prg
Called from MAIN(404) in HBTEL.PRG
i have try to include Line 2778 but same Error

Code: Select all

2776  IF USED()
2777      ORDSETFOCUS("KDNAME")
2778      cLocalSearchString := VAR2CHAR(cLocalSearchString)  // =>  hb_valToExp()
2779      SEEK( UPPER( cLocalSearchString ) )
what does the Error want to tell me :?:
have fun
Jimmy
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: what does this mean : Unrecoverable error 9201: hb_cdxPageSeekKey: wrong parent key

Post by serge_girard »

what INDEX?
There's nothing you can do that can't be done...
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: what does this mean : Unrecoverable error 9201: hb_cdxPageSeekKey: wrong parent key

Post by AUGE_OHR »

hi Serge,
serge_girard wrote: Thu Oct 03, 2024 12:02 pm what INDEX?
*.CDX create by Xbase++

Code: Select all

PROCEDURE CreateCDX( cCodepage )
LOCAL _tagname, _keyfeld, _cdxname

   USE XPPTEL.DBF VIA "DBFCDX" EXCLUSIVE CODEPAGE (cCodepage)

   _cdxname := "XPPTEL.CDX"                                           // "TELINDEX"

   _tagname := "KDNAME"                                               //zkdname   1
   _KEYFELD := "UPPER(NAME1+NAME2)"
   ORDCREATE( _cdxname, _tagname, _keyfeld )
   CLOSE INDEX
...
   // 12 more TAGs
have fun
Jimmy
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: what does this mean : Unrecoverable error 9201: hb_cdxPageSeekKey: wrong parent key

Post by serge_girard »

and what is value of : cLocalSearchString := VAR2CHAR(cLocalSearchString)
before and after?
There's nothing you can do that can't be done...
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: what does this mean : Unrecoverable error 9201: hb_cdxPageSeekKey: wrong parent key

Post by AUGE_OHR »

hi Serge,
serge_girard wrote: Thu Oct 03, 2024 12:49 pm and what is value of : cLocalSearchString := VAR2CHAR(cLocalSearchString)
before and after?
her i start within a GRID by press a Alpha-Key (a-z)

Code: Select all

DEFINE GRID Browse_1
    ...
    ON KEY SeekKeyInput() 
END GRID
her the full CODE

Code: Select all

2750	STATIC FUNCTION SeekKeyInput()
2751	
2752	LOCAL cInkey := ""
2753	LOCAL ch, i, k, cLocalSearchString
2754	
2755   //   ch := HMG_GetLastCharacter()
2756   ch := HMG_GetLastCharacterEx()
2757
2758   IF HMG_GetLastVirtualKeyDown() == VK_BACK                          //   backspace
2759      HMG_CleanLastVirtualKeyDown()
2760      cSearchString := HB_ULEFT( cSearchString, MAX( 0, HMG_LEN( cSearchString ) - 1 ) )
2761      cLocalSearchString := cSearchString
2762
2763   ELSEIF HMG_GetLastVirtualKeyDown() == VK_ESCAPE                    //
2764      HMG_CleanLastVirtualKeyDown()
2765      cSearchString := ""
2767      SetProperty( "XPPTEL", "Text_Suche", "Value", cSearchString )
2768      RETURN Nil                                                      // enable processing the current message
2769
2770   ELSE
2771      IF EventMsg() <> WM_CHAR
2772         RETURN Nil                                                   // enable processing the current message
2773      ENDIF
2774      cLocalSearchString := cSearchString + ch
2775   ENDIF
2776
2777   IF USED()
2778      ORDSETFOCUS("KDNAME")
2779      cLocalSearchString := VAR2CHAR(cLocalSearchString)
2780      SEEK( UPPER( cLocalSearchString ) )
i have add line 2779 only to be sure that i search using a String (VAR2CHAR() -> hb_valToExp() )
have fun
Jimmy
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: what does this mean : Unrecoverable error 9201: hb_cdxPageSeekKey: wrong parent key

Post by serge_girard »

Strange.. try with LOCATE
There's nothing you can do that can't be done...
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: what does this mean : Unrecoverable error 9201: hb_cdxPageSeekKey: wrong parent key

Post by edk »

My guess is that the API works in CP UTF8, and what CP is DBF in? Perhaps there is a conversion problem between CPs?
Post Reply