xbrowse+tmysql Blank record

xbrowse+tmysql Blank record

Postby Francisco Horta » Thu Jul 07, 2011 3: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/
Image

Uploaded with ImageShack.us

i'm freaky,
regards
paco
____________________
Paco
Francisco Horta
 
Posts: 845
Joined: Sun Oct 09, 2005 5:36 pm
Location: la laguna, mexico.

Re: xbrowse+tmysql Blank record

Postby nageswaragunupudi » Fri Jul 08, 2011 1:52 am

After creating xBrowse,
Code: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse+tmysql Blank record

Postby Francisco Horta » Sat Jul 09, 2011 2: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
Francisco Horta
 
Posts: 845
Joined: Sun Oct 09, 2005 5:36 pm
Location: la laguna, mexico.

Re: xbrowse+tmysql Blank record

Postby nageswaragunupudi » Sat Jul 09, 2011 3:05 pm

Please try this revised code instead of the above:
Code: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse+tmysql Blank record

Postby Francisco Horta » Sat Jul 09, 2011 3:37 pm

RRAAOO,,

many many thanks, simply amazing !!!!
Works fine!!!
where is the bug, in xbrowse.prg?
thanks
regards
paco
____________________
Paco
Francisco Horta
 
Posts: 845
Joined: Sun Oct 09, 2005 5:36 pm
Location: la laguna, mexico.

Re: xbrowse+tmysql Blank record

Postby Francisco Horta » Sat Jul 09, 2011 4: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
Francisco Horta
 
Posts: 845
Joined: Sun Oct 09, 2005 5:36 pm
Location: la laguna, mexico.

Re: xbrowse+tmysql Blank record

Postby nageswaragunupudi » Sat Jul 09, 2011 4:42 pm

Francisco Horta wrote: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

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 86 guests