FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse+tmysql Blank record
Posts: 845
Joined: Sun Oct 09, 2005 05:36 PM
xbrowse+tmysql Blank record
Posted: Thu Jul 07, 2011 03:08 PM
hi forum,

somethig idea, i used xbrowse+tmysql(contrib) and this is my result, ever ever at the end append blank record, see image
oBrw2 := TXBrowse():New( oDlg )
oBrw2:SetMySql( oQry2, .F. )
http://imageshack.us/photo/my-images/825/recblank.jpg/


Uploaded with ImageShack.us

i'm freaky,
regards
paco
____________________

Paco
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse+tmysql Blank record
Posted: Fri Jul 08, 2011 01:52 AM
After creating xBrowse,
Code (fw): Select all Collapse
oBrw:bSkip := { |n,x| x := oBrw:oMySql:RecNo(), ;
                      oBrw:oMySql:GoTo( Max( 1, Min( oBrw:MySql:LastRec(), x + n ) ) ), ;
                      oBrw:oMySql:RecNo() - x }

Please try and let us know the result.
Regards



G. N. Rao.

Hyderabad, India
Posts: 845
Joined: Sun Oct 09, 2005 05:36 PM
Re: xbrowse+tmysql Blank record
Posted: Sat Jul 09, 2011 02:10 PM

hi rao,

i have this error:
Error description: Error BASE/1081 Error de argumento: +
Args:
[ 1] = N 1
[ 2] = U

variable "x" is NIL
then no work..
regards
paco

____________________

Paco
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse+tmysql Blank record
Posted: Sat Jul 09, 2011 03:05 PM
Please try this revised code instead of the above:
Code (fw): Select all Collapse
oBrw:bSkip := { |n,x| x := oBrw:oMySql:RecNo(), ;
                      oBrw:oMySql:GoTo( Max( 1, ;
                      Min( oBrw:MySql:LastRec(), x + IfNil( n, 1 ) ) ) ), ;
                      oBrw:oMySql:RecNo() - x }

Please place this code after oBrw:SetMySql(...)
Please let us know if this works.
Regards



G. N. Rao.

Hyderabad, India
Posts: 845
Joined: Sun Oct 09, 2005 05:36 PM
Re: xbrowse+tmysql Blank record
Posted: Sat Jul 09, 2011 03:37 PM

RRAAOO,,

many many thanks, simply amazing !!!!
Works fine!!!
where is the bug, in xbrowse.prg?
thanks
regards
paco

____________________

Paco
Posts: 845
Joined: Sun Oct 09, 2005 05:36 PM
Re: xbrowse+tmysql Blank record
Posted: Sat Jul 09, 2011 04:17 PM

RAO,

in xbrowse.prg in methos setmysql change:
this -> DEFAULT ::bSkip := {| n | ::oMysql:Skip( n ) }

and put this -> DEFAULT ::bSkip := { |n,x| x := ::oMySql:RecNo(), ;
::oMySql:GoTo( Max( 1, Min( ::oMySql:LastRec(), x + IfNil( n, 1 ) ) ) ), ;
::oMySql:RecNo() - x }
like you said, and correct all browses automatically..
is correct?
thanks
paco

____________________

Paco
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse+tmysql Blank record
Posted: Sat Jul 09, 2011 04:42 PM
Francisco Horta wrote:RAO,

in xbrowse.prg in methos setmysql change:
this -> DEFAULT ::bSkip := {| n | ::Skip( n ) }

and put this -> DEFAULT ::bSkip := { |n,x| x := ::RecNo(), ;
::GoTo( Max( 1, Min( ::LastRec(), x + IfNil( n, 1 ) ) ) ), ;
::RecNo() - x }
like you said, and correct all browses automatically..
is correct?
thanks
paco

Yes, you are correct.
We have now modified xbrowse.prg. This change will be available from the next release.
I thank you for testing and confirming that this is working.
You may make this change in your copy of xbrowse.prg and use it for your work.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion