Page 1 of 1

Error XBROWSE SEEK (while no Index) after change RDD

PostPosted: Mon May 01, 2023 2:19 pm
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 view
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 :?:

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

PostPosted: Tue May 02, 2023 8:07 am
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.

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

PostPosted: Tue May 02, 2023 3:43 pm
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 ? ) :?

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

PostPosted: Wed May 03, 2023 8:13 pm
by nageswaragunupudi
I am trying to understand and learn.
Code: Select all  Expand view

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.

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

PostPosted: Wed May 03, 2023 10:14 pm
by Jimmy
hi,

thx for Answer.

it had to do with this Array aOptions
Code: Select all  Expand view
   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 :?:

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

PostPosted: Thu May 04, 2023 5:18 pm
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...

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

PostPosted: Fri May 05, 2023 4:06 am
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

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

PostPosted: Sat May 06, 2023 11:54 am
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 view
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 view
oBrw:lIncrSeek := .f.

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

PostPosted: Mon May 08, 2023 12:28 pm
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

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

PostPosted: Mon May 08, 2023 1:55 pm
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.