new bug xBrowse 20.02 [solved]

Post Reply
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

new bug xBrowse 20.02 [solved]

Post by MOISES »

Hello,

ISome customers are reporting me this error in xBrowse:

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

Code: Select all


//----------------------------------------------------------------------------//

METHOD AdoIncrSeek( uSeek ) CLASS TXBrowse

   local lFound   := .f.
   this line-> local cCol     := CharRem( "[]", StrToken( ::oRs:Sort, 1 ) )
 
Thank you
Last edited by MOISES on Tue Apr 28, 2020 11:14 am, edited 1 time in total.
Saludos / Regards,

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

Re: new bug xBrowse 20.02

Post by MOISES »

Up
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: new bug xBrowse 20.02

Post by Silvio.Falconi »

perhaps ::oRs:Sort() ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: new bug xBrowse 20.02

Post by nageswaragunupudi »

Code: Select all

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
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: new bug xBrowse 20.02

Post by MOISES »

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
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: new bug xBrowse 20.02

Post by MOISES »

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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: new bug xBrowse 20.02

Post by nageswaragunupudi »

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
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: new bug xBrowse 20.02

Post by MOISES »

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: Select all

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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: new bug xBrowse 20.02

Post by nageswaragunupudi »

done
Regards

G. N. Rao.
Hyderabad, India
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: new bug xBrowse 20.02 [solved]

Post by MOISES »

Thank you very much!
Saludos / Regards,

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

Re: new bug xBrowse 20.02 [solved]

Post by MOISES »

I am afraid you undid the changes in FW 20.04:

Code: Select all

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: Select all

  

   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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: new bug xBrowse 20.02 [solved]

Post by nageswaragunupudi »

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
Post Reply