FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour xbrowse y bseek 驴C贸mo se usa?
Posts: 234
Joined: Tue Oct 25, 2005 12:39 AM
xbrowse y bseek 驴C贸mo se usa?
Posted: Wed May 21, 2008 09:16 PM

Pues tengo 茅sta duda... 驴C贸mo se usa el bseek para la busqueda incremental en un xbrowse?

No hayo como indicar que la busqueda sea por una columna en especial o hay que activar indices... no s茅. Toy perdido :-( El siguiente c贸digo marca error a煤n cuando tengo el indice abierto.

Error description: Error DBFCDX/1201 Workarea not indexed

Stack Calls

Called from: => DBSEEK(0)
Called from: CAPTURA.PRG => (b)VERCATALOGO(2876)
Called from: XBROWSE.PRG => TXBROWSE:SEEK(0)
Called from: XBROWSE.PRG => TXBROWSE:KEYCHAR(0)

// C贸digo que estoy usando

  REDEFINE XBROWSE oLbx ID 201 OF oDlg ;
     ALIAS "LINEAS" ;
   HEADERS "Linea","Nueva Def","Descripci贸n","Producto" ;
   COLUMNS "CLINEA","CNUEVADEF","CDESCRIBE" ,"CPRODUCTO" ;
  COLSIZES 90 , 90, 200 , 90 ;
    ON DBLCLICK ( lPegar := TRUE, oDlg:End() ) ;
           AUTOSORT


  oLbx:bKeyChar  = { | nKey | IF( nKey=13, ;
     ( lPegar:= TRUE, oDlg:End() ) , FALSE ) }

  oLbx:bSeek            := {|c| DbSeek( Upper( c ) ) }
Posts: 248
Joined: Wed Jan 11, 2006 11:30 AM
xbrowse y bseek 驴C贸mo se usa?
Posted: Thu May 22, 2008 04:52 AM
aleseribeli@hotmail.com

FwH, Hb Svn, ADS 8.1, ADS 10, Pelles C, FwPPC, MsVc 2008, MsVc 2010
"Conhecimento, voc锚 n茫o subtrai quando divide; mas soma e multiplica."
**---M谩rio Persona---**
Posts: 682
Joined: Tue Feb 14, 2006 09:48 AM
xbrowse y bseek 驴C贸mo se usa?
Posted: Thu May 22, 2008 06:54 AM
Tienes que tener un indice creado en la tabla, para la columna por la que quieres buscar.
Suponiendo que tengas la tabla "LINEAS" indexada por el campo "CDESCRIBE"
oLbx:bSeek := {|c| Lineas->DbSeek( Upper( c ) ,.t.) }

Te recomiendo que le antepongas el alias, y uses el parametro softseek a .t.

Con esto debiera funcionarte.
Saludos desde Mallorca
Biel Maim贸
http://bielsys.blogspot.com/
Posts: 234
Joined: Tue Oct 25, 2005 12:39 AM
cierto
Posted: Thu May 22, 2008 06:26 PM

Ale SB y Biel,

Gracias.
Efectivamente falta el alias

Ahora ya trabaja :-)

Continue the discussion