error mysql y xbrowse ??

error mysql y xbrowse ??

Postby Mauricio » Thu Oct 15, 2009 3: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: Select all  Expand view
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: Select all  Expand view
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
User avatar
Mauricio
 
Posts: 199
Joined: Thu Oct 06, 2005 9:07 pm
Location: San Diego, CA

Re: error mysql y xbrowse ??

Postby Antonio Linares » Thu Oct 15, 2009 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: error mysql y xbrowse ??

Postby Mauricio » Thu Oct 15, 2009 5:31 pm

Antonio,

Gracias,

es mas facil resolverlo si le hechamos monton :P


Saludos,
Mauricio
User avatar
Mauricio
 
Posts: 199
Joined: Thu Oct 06, 2005 9:07 pm
Location: San Diego, CA

Re: error mysql y xbrowse ??

Postby Antonio Linares » Thu Oct 15, 2009 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

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