FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBrowse + MySQL
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
XBrowse + MySQL
Posted: Wed Feb 02, 2011 06:57 PM

I am trying to rewrite a working app that use common listbox with xbrowse.

oServ := TMySQLServer():New( "10.73.0.16", "andre", "senhateste" )
oQuer := oServ:query( "SELECT id, nome, ativ FROM atividades" )

DEFINE WINDOW oWnd
oLbx := TXBrowse():new( oWndc )
oLbx:SetMysql( oQuer )
oLbx:createfromcode()
oWndc:oClient := oLbx
ACTIVATE WINDOW oWndc

Error description: Error BASE/44 Assigned value is wrong class: TXBROWSE:NLEN
Args:
[ 1] = C
Stack Calls
===========
Called from: => TXBROWSE:_NLEN(0)
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE(386)

I saw that xbrowse use ::oMysql:RecCount() in the SetMysql method. But oQuer:RecCount() returns an empty string while oQuer:lastrec() returns the correct number of rows. I modified xbrowse to use lastrec() and the xbrowse displays OK but other erros pop up. Só I like to know if I am using xbrowse+mysql in a wrong way.

Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: XBrowse + MySQL
Posted: Mon Feb 07, 2011 11:28 AM
André,
I modified xbrowse to use lastrec() and the xbrowse displays OK but other erros pop up

What errors are them ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: XBrowse + MySQL
Posted: Mon Feb 07, 2011 12:41 PM
- oQuer:lastRec() returns 9 but xbrowse shows 13 lines, 4 of them empty


- pressing down key does not change the index row of xbrowse. The data of next line is shown at the same position.


- after a few seconds the browse refreshes by itself.
Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: XBrowse + MySQL
Posted: Sat Feb 12, 2011 01:03 AM

André,

What TMySQL.prg version are you using ?

Please post here its source code, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion