FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour error mysql y xbrowse ??
Posts: 199
Joined: Thu Oct 06, 2005 09:07 PM
error mysql y xbrowse ??
Posted: Thu Oct 15, 2009 03:26 AM
Hola:

estoy compilando una aplicaci贸n con tmysql y xbrowse, al presionar cualquier tecla en el browse marca este error.

Application
===========
Path and name: c:\wizard\wizard.Exe (32 bits)
Size: 727,040 bytes
Time from start: 0 hours 0 mins 18 secs
Error occurred at: 14-10-2009, 20:13:33
Error description: Error BASE/1066 Argument error: conditional
Args:
[ 1] = C

Stack Calls
===========
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SEEK(5065)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:KEYCHAR(2083)

================================

parece que al usar tmysql en xbrowse funciona como si hubiera activado la busqueda incremental, aun cuando la tengo definida a nil.

el error parece ser en esta parte del codigo de xbrowse.
Code (fw): Select all Collapse
METHOD Seek( cSeek ) CLASS TXBrowse
聽 聽local uBook, uSeek
聽 聽local nFor, nRows
聽 聽local lRefresh

聽 聽msginfo( cSeek ) // se lo puse para ver que llega en bSeek
聽 聽if ::bSeek == nil
聽 聽 聽 return nil
聽 聽endif

聽 聽If cSeek == nil
聽 聽 聽 if ! Empty( ::cSeek )
聽 聽 聽 聽 聽::cSeek := ""
聽 聽 聽 聽 聽If ::oSeek != nil
聽 聽 聽 聽 聽 聽 ::oSeek:SetText( "" )
聽 聽 聽 聽 聽Endif
聽 聽 聽 endif
聽 聽 聽 return nil
聽 聽Endif


lo que hice hacer un return en cuanto llega a este metodo
Code (fw): Select all Collapse
METHOD Seek( cSeek ) CLASS TXBrowse
聽 聽local cQuery
聽 聽local cChar
聽 聽return nil
聽 聽if cSeek == NIL
聽 聽 聽 return nil
聽 聽endif
聽 聽if asc(cSeek) > 聽63 .and. asc(cSeek) < 123
聽 聽 聽 cChar := upper( cSeek)
聽 聽 聽 cBuscador+= cChar

聽 聽 聽 //cQuery := 'SELECT * FROM '+oTabla+' WHERE '+oOrden+" LIKE '"+cbusca+"%' ORDER BY "+oOrden+" 聽LIMIT 50", oConexion, 1, 3)
聽 聽endif


le pongo un msginfo al valor de cSeek y me llegan las letras que presiono y marca el error.

lo que hice fue dejar el codigo como esta, en cuanto llega el metodo seek, le doy un return y ya en el browse capturo las teclas para la busqueda incremental con bKeyDown.

solo lo hace con MySql, algo parecido escribio el Sr. Willian Morales en otro post.

Saludos,
Mauricio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: error mysql y xbrowse ??
Posted: Thu Oct 15, 2009 05:16 AM

Mauricio,

Esta es nuestra propuesta:

viewtopic.php?p=88423#p88423

Ahora habria que modificar tu c贸digo para que verifique este valor en oBrw:nDataType

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 199
Joined: Thu Oct 06, 2005 09:07 PM
Re: error mysql y xbrowse ??
Posted: Thu Oct 15, 2009 05:31 PM

Antonio,

Gracias,

es mas facil resolverlo si le hechamos monton :P

Saludos,
Mauricio

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: error mysql y xbrowse ??
Posted: Thu Oct 15, 2009 09:47 PM

Mauricio,

William public贸 los cambios para xbrowse.prg y TMySQL :-)

viewtopic.php?p=88481#p88481

Puedes por favor probarlos con tu aplicaci贸n y confirmarnos si te funcionan bien ? gracias! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion