xBrowse and SQLRDD bug

xBrowse and SQLRDD bug

Postby MOISES » Mon Apr 06, 2020 8:09 am

Hi,

I would like to ask the status of the fix, as I reported the wrong behaviour in december.

Thank you.
Last edited by MOISES on Fri Apr 10, 2020 4:06 pm, edited 1 time in total.
Saludos / Regards,

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

Re: xBrowse and SQLRDD bug

Postby MOISES » Wed Apr 08, 2020 3:42 pm

Up!
Saludos / Regards,

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

Re: xBrowse and SQLRDD bug

Postby MOISES » Sun Apr 12, 2020 12:19 pm

Up
Saludos / Regards,

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

Re: xBrowse and SQLRDD bug

Postby MOISES » Tue Apr 14, 2020 6:30 am

???
Saludos / Regards,

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

Re: xBrowse and SQLRDD bug

Postby MOISES » Thu Apr 23, 2020 9:41 am

Any update please?
Saludos / Regards,

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

Re: xBrowse and SQLRDD bug

Postby Antonio Linares » Thu Apr 23, 2020 12:13 pm

Moises,

I just asked Rao, I am waiting for his answer

Also, please keep in mind that SQLRDD is a commercial product, that does not provide source code, and its not easy to support it in those circunstances,
anyhow we are doing out best to help you.

So, please, be patient. Changing the caption of your posts only provide a wrong sense to other users and its not a kind way to ask for help.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: xBrowse and SQLRDD bug

Postby karinha » Thu Apr 23, 2020 12:48 pm

Hable con Marcelo Lombardo del Proyecto xHarbour.

Skype:

marcelolombardo

Saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7811
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xBrowse and SQLRDD bug

Postby MOISES » Thu Apr 23, 2020 2:38 pm

Olá,

Como não falo nem português nem brasileiro, poderia partilhar connosco a sua resposta?

Muito obrigado.
Saludos / Regards,

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

Re: xBrowse and SQLRDD bug

Postby karinha » Thu Apr 23, 2020 2:58 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7811
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xBrowse and SQLRDD bug

Postby nageswaragunupudi » Wed Apr 29, 2020 11:48 am

The issue is about vertical scrollbar support to xbrowse for SQLRDD.
I have sent modified xbrowse.prg, restoring previous functionality.

Vertical scrollbar support for SQLRDD is very limited.
In order to provide better support we need to know some details about SQLRDD.

We will start explaining with a DBFCDX DBF.
In this example, states.dbf is used via DBFCDX and index order is set to field NAME and also a filter is set:
Code: Select all  Expand view
function XbrVScroll

   field NAME
   local oDlg, oBrw, oFont

   USE STATES NEW VIA "DBFCDX"
   SET ORDER TO TAG NAME
   SET FILTER TO NAME >= "A" .AND. NAME <= "D"
   GO TOP

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 400,300 PIXEL TRUEPIXEL FONT oFont TITLE "VSCROLLBAR"

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "STATES" ;
      COLUMNS "RECNO()", "CODE", "NAME" ;
      PICTURES "999" ;
      CELL LINES NOBORDER

   WITH OBJECT oBrw
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 


Image

In this case, xbrowse knows that the total number of visible records in the DBF are 9 (nine) with the help of the function OrdKeyCount().
Also xbrowse knows that the current record is 7th (seventh) from top using the function OrdKeyNo().
With this information, xbrowse is able to position the thumb of the scrollbar at 7/9 of the scrollbar.

Also if the user drags the scrollbar to say 3/9th position on the scrollbar, then xbrowse will move the record position to the 3rd record from the top using OrdKeyGoTo().

Using this example, please advise us how should xbrowse ascertain

1) The total number of records visible in the DBF
2) What is the serial number of the current record counting from the top.
3) How to go to a record at the nth position when counted from the top.

If you can provide us what functions to use to know the above three, then we will be able to provide full support for vertical scrollbar.

Please help us.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse and SQLRDD bug

Postby MOISES » Wed Apr 29, 2020 5:34 pm

Thank you very much for your time and support.

With the changes you have sent me, it is possible to navigate in the xBrowse by moving the vertical scroll bar. The only remaining problem is if I perform a DbGoBottom() and then call xBrowse, the vertical scroll bar still appears on top.

OrdKeyCount() works perfect under SQLRDD, but OrdKeyNo() is not supported, it returns 0 always. They are not going to fix it, they say it is impossible.

In the past, you solved I think as follows:

Code: Select all  Expand view
 
   DEFAULT ::bKeyNo     := ::bBookMark, ;
            ::bKeyCount  := { || ( ::cAlias )->( LastRec() ) }


viewtopic.php?f=3&t=24327&p=138698#p138698
Saludos / Regards,

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

Re: xBrowse and SQLRDD bug

Postby nageswaragunupudi » Thu Apr 30, 2020 12:25 am

This code:
Code: Select all  Expand view
DEFAULT ::bKeyNo     := ::bBookMark, ;


::bBookMark is { |x| If( x == nil, RECNO(), DBGOTO( x ) ) }

This works well if the DBF is in natural order (with no index set) and when no filter is set.
If the DBF is set to an index or if a filter is set, this behaves very erratically.
Do you want this?

Please also let me know do these functions work reliably with SQLRDD?
Code: Select all  Expand view

DBFILTER()
ORDSETFOCUS()
 


Can you also please confirm that when a filter is set, OrdKeyCount() returns the count of filtered records only?


In the post you referred, Mr. Kokoo suggested maintaining an array of RecNo()s outside the xbrowse. This works well but the programmer has to do an extra work of creating the array at the beginning and recreating whenever the index is changed, record is added or deleted of a keyvalue is edited and modified. This is upto you if you want to adopt this approach.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse and SQLRDD bug

Postby nageswaragunupudi » Thu Apr 30, 2020 1:30 am

To give the same effect as the code:
Code: Select all  Expand view

::bKeyNo := ::bBookMark
 


we made these changes:
Code: Select all  Expand view

      DEFAULT ::bKeyNo := { |n| ( ::cAlias )->( SqlRddKey( n ) ) }

...
...
static function SqlRddKey( x )

   if Empty( DBFILTER() ) .and. Empty( OrdSetFocus() )
      if x != nil
         DBGOTO( x )
      endif
      return RECNO()
   endif

return 0
 


We sent the modified xbrowse.prg to your email.
Please check.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse and SQLRDD bug

Postby MOISES » Thu Apr 30, 2020 7:41 am

Yes, I confirm that DBFILTER()/SET FILTER TO and ORDSETFOCUS() work under SQLRDD.

And yes, when a filter is set, OrdKeyCount() Works too.

But never OrdKeyNo()

I am going to test your new versión and share the results.

Thank you.
Saludos / Regards,

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

Re: xBrowse and SQLRDD bug

Postby MOISES » Thu Jun 04, 2020 9:22 am

Up!
Saludos / Regards,

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

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests