FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour new bug xBrowse 20.02 [solved]
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

new bug xBrowse 20.02 [solved]

Posted: Sun Apr 19, 2020 09:30 AM
Hello,

ISome customers are reporting me this error in xBrowse:

Event description: Problem BASE/1004 There is no method: SORT
Args:
[ 1] = U

Code (fw): Select all Collapse
//----------------------------------------------------------------------------//

METHOD AdoIncrSeek( uSeek ) CLASS TXBrowse

   local lFound   := .f.
   this line-> local cCol     := CharRem( "[]", StrToken( ::oRs:Sort, 1 ) )


Thank you
Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

Re: new bug xBrowse 20.02

Posted: Wed Apr 22, 2020 07:13 AM

Up

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: new bug xBrowse 20.02

Posted: Wed Apr 22, 2020 10:16 AM

perhaps ::oRs:Sort() ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: new bug xBrowse 20.02

Posted: Wed Apr 22, 2020 04:48 PM
Code (fw): Select all Collapse
Event description: Problem BASE/1004 There is no method: SORT
Args:
[ 1] = U


This error indicates that the value of oBrw:oRs is NIL.
Please check your application why oBrw:oRs is becoming nil.
Regards



G. N. Rao.

Hyderabad, India
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

Re: new bug xBrowse 20.02

Posted: Wed Apr 22, 2020 05:27 PM

Thank you for your reply. I hope you're in good health.

Some customers reported this error, but they are working with Access in a local pc, with no lan or Internet involved.

Can you please, as a safety precaution, check that oBrw:oRs is not nil before contunuing with this method?

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

Re: new bug xBrowse 20.02

Posted: Wed Apr 22, 2020 07:27 PM

Probably the user has an active oBrowse:oSeek, and he deletes the record, so oRs becomes to nil.

How can we handle it?

Thank you.

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: new bug xBrowse 20.02

Posted: Mon Apr 27, 2020 06:21 AM
Probably the user has an active oBrowse:oSeek, and he deletes the record, so oRs becomes to nil.

Deleting one record does not close the RecordSet.
Deleting a record using oBrw:Delete() is always safe.
Regards



G. N. Rao.

Hyderabad, India
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

Re: new bug xBrowse 20.02

Posted: Mon Apr 27, 2020 08:09 AM
Thank you very much for your attention.

We have not been able to reproduce the generation of the error, in which case we could have provided you with a more precise solution. It could even be an ADO error itself.

So, as an additional security measure, could you please modify the code of xbrowse, something like that:

Code (fw): Select all Collapse
METHOD AdoIncrSeek( uSeek ) CLASS TXBrowse

   local lFound   := .f.
   local cCol     := ""
   local cExpr    := ''
   local cType, d, uVal, lSoft, cSaveFilt

   if hb_isnil( ::oRs )
      return .f.
   endif
   
   cCol     := CharRem( "[]", StrToken( ::oRs:Sort, 1 ) )
Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: new bug xBrowse 20.02

Posted: Tue Apr 28, 2020 10:12 AM

done

Regards



G. N. Rao.

Hyderabad, India
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

Re: new bug xBrowse 20.02 [solved]

Posted: Tue Apr 28, 2020 11:14 AM

Thank you very much!

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

Re: new bug xBrowse 20.02 [solved]

Posted: Thu May 07, 2020 02:57 PM
I am afraid you undid the changes in FW 20.04:

Code (fw): Select all Collapse
METHOD AdoIncrSeek( uSeek ) CLASS TXBrowse

   local lFound   := .f.
   local cCol     := CharRem( "[]", StrToken( ::oRs:Sort, 1 ) )
   local cExpr    := ''
   local cType, d, uVal, lSoft, cSaveFilt

   if ::oRs == nil
      return .f.
   endif


cCol will fail because it should be after if ::oRs == nil:

Code (fw): Select all Collapse
  

   if ::oRs == nil
      return .f.
   endif
   
   cCol     := CharRem( "[]", StrToken( ::oRs:Sort, 1 ) )


Thank you.
Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: new bug xBrowse 20.02 [solved]

Posted: Thu May 07, 2020 03:21 PM

You are right
Sorry
Please make the proper modification in your copy.
We will incorporate it for next release.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion