Error XBROWSE SEEK (while no Index) after change RDD

Post Reply
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Error XBROWSE SEEK (while no Index) after change RDD

Post by Jimmy »

hi,

i got Error when press a Key, after change RDD
Error description: Error BASE/1066 Argument error: conditional
Args:
[ 1] = U

Stack Calls
===========
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SEEK( 9409 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:KEYCHAR( 3861 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1857 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 12219 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3681 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1114 )
Called from: .\DUALGRID.PRG => MAIN( 935 )
i do open DBF and use

Code: Select all | Expand

PROCEDURE SetRddNr( nRDD )
   // nRDD := SP_nRDDlock()
   // DO CASE
   //    CASE nRDD = DB_DBFLOCK_DEFAULT   // 0
   //    CASE nRDD = DB_DBFLOCK_CLIPPER   // 1   /* default Cl*pper locking scheme */
   //    CASE nRDD = DB_DBFLOCK_COMIX     // 2   /* COMIX and CL53 DBFCDX hyper locking scheme */
   //    CASE nRDD = DB_DBFLOCK_VFP       // 3   /* [V]FP, CL52 DBFCDX, SIx3 SIXCDX, CDXLOCK.OBJ */
   //    CASE nRDD = DB_DBFLOCK_HB32      // 4   /* Harbour hyper locking scheme for 32bit file API */
   //    CASE nRDD = DB_DBFLOCK_HB64      // 5   /* Harbour hyper locking scheme for 64bit file API */
   //       SET DBFLOCKSCHEME TO DB_DBFLOCK_HB64
   //    CASE nRDD = DB_DBFLOCK_CLIPPER2  // 6   /* extended Cl*pper locking scheme NTXLOCK2.OBJ */
   //       SET DBFLOCKSCHEME TO DB_DBFLOCK_HB64
   // ENDCASE

   IF hb_OSIS64BIT()
      SP_nRDDlock( nRDD - 1 )
   ELSE
      IF nRDD = 6                                                     // "NTXOBJ2"
         SP_nRDDlock( nRDD )
      ELSE
         SP_nRDDlock( nRDD - 1 )
      ENDIF
   ENDIF
   SET DBFLOCKSCHEME TO SP_nRDDlock()

RETURN
what is going wrong and "why" does "increment SEEK" will be active after change RDD Settings :?:
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Error XBROWSE SEEK (while no Index) after change RDD

Post by nageswaragunupudi »

Version of FWH?
Line numbers are not matching with FWH2212 xbrowse.prg, unless modified.
Are you using Incremental Filter or Seek?
Incremental seek works only for indexed DBF, when an index is selected.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Error XBROWSE SEEK (while no Index) after change RDD

Post by Jimmy »

hi,
nageswaragunupudi wrote:Version of FWH?
22.07
nageswaragunupudi wrote: Line numbers are not matching with FWH2212 xbrowse.prg, unless modified.
Are you using Incremental Filter or Seek?
Incremental seek works only for indexed DBF, when an index is selected.
i do NOT use any Index and that OEM DBF have no *.CDX

i "just" play with "SET DBFLOCKSCHEME" and suddenly "Increment" is active (how to disable Increment ? ) :?
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Error XBROWSE SEEK (while no Index) after change RDD

Post by nageswaragunupudi »

I am trying to understand and learn.

Code: Select all | Expand

IF hb_OSIS64BIT()
      SP_nRDDlock( nRDD - 1 )
 
I understand hb_OSIS64BIT() is to check if our Windows OS is 64 bit. If I am right, it always returns .t.
In what way does that affect LockingScheme?
For checking if the Exe is 64-bit (i.e., if the harbour library and RDD is 64-bit), we use FWH function IsExe64(). I do not know if there is a harbour function for this purpose. If one exists, I would like to know.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Error XBROWSE SEEK (while no Index) after change RDD

Post by Jimmy »

hi,

thx for Answer.

it had to do with this Array aOptions

Code: Select all | Expand

    IF hb_OSIS64BIT
      aOptions := { "DEFAULT", "CLIPPER", "COMIX", "VFP", "HB32", "HB64", "NTXOBJ2" }
      nItems := 7
   ELSE
      aOptions := { "DEFAULT", "CLIPPER", "COMIX", "VFP", "HB32", "NTXOBJ2" }
      nItems := 6
   ENDIF
Lock-Mode (not RDD sorry) "HB64", are not available on 32 Bit OS

---

i "think" it was my Error as User can take "every" Lock-Mode
but if use RDD DBFCDX it is wrong to use CLIPPER or NTXOBJ2 Lock-Mode

so i have "disable" RADIONITEM depend on RDD

btw. what RDD use HB32 and HB64 :?:
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: Error XBROWSE SEEK (while no Index) after change RDD

Post by Antonio Linares »

Dear Jimmy,

> btw. what RDD use HB32 and HB64 :?:

They both use the same ones: DBFNTX, DBFCDX, ADS, LOGRDD, ADORDD (not included in the Harbour repo)

They may be more surely...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Error XBROWSE SEEK (while no Index) after change RDD

Post by Jimmy »

hi Antonio
Antonio Linares wrote:They both use the same ones: DBFNTX, DBFCDX, ADS, LOGRDD, ADORDD (not included in the Harbour repo)
thx for Answer
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Error XBROWSE SEEK (while no Index) after change RDD

Post by nageswaragunupudi »

Error description: Error BASE/1066 Argument error: conditional
Args:
[ 1] = U

Stack Calls
===========
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SEEK( 9409 )
This error occurred while executing the line

Code: Select all | Expand

Eval( ::bSeek, ... )
Looks like you set oBrw:bSeek := nil
We recommend not to. Instead oBrw:bSeek can be { || .f. }
When the dbf is not indexed or not set to any index, the inbuilt bSeek returns .F.

Till FWH2206, Incremental seek was always on by default.

From FWH2212, we can disable incremental seek by setting

Code: Select all | Expand

oBrw:lIncrSeek := .f.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Error XBROWSE SEEK (while no Index) after change RDD

Post by Jimmy »

hi,
nageswaragunupudi wrote:Looks like you set oBrw:bSeek := nil
We recommend not to. Instead oBrw:bSeek can be { || .f. }
When the dbf is not indexed or not set to any index, the inbuilt bSeek returns .F.
YES, i have try to SET bSeek to NIL

my "Problem" was that i have many DBF which work with *.NTX which does not "Autopen" Index
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Error XBROWSE SEEK (while no Index) after change RDD

Post by nageswaragunupudi »

YES, i have try to SET bSeek to NIL

my "Problem" was that i have many DBF which work with *.NTX which does not "Autopen" Index
Does not matter.
It is not a good idea to disturb XBrowse's internal defaults.
The default bSeek does not harm you when you are browsing DBFNTX dbfs.
Regards

G. N. Rao.
Hyderabad, India
Post Reply