FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TDolphin-xBrowse help or example with dynamic seek please...
Posts: 53
Joined: Wed Aug 06, 2008 05:27 PM
TDolphin-xBrowse help or example with dynamic seek please...
Posted: Wed Jan 30, 2013 05:26 PM
hello everybody,

does someone have example for xbrowse dialog based on Daniels tDolpnin functions:
Code (fw): Select all Collapse
oQry := TDolphinQry():New( "select barcode,if,name,price from Article ORDER by name" , oServer )


Idea was to port clipper dbedit() function to tDolphin, which was be able to make fast position on table of articles with +50,000 records. When customer type any name of article from table, cursor immediately found nearest record. I have solution with oQry:seek, but on 50,000 records table is to slow.
Code (fw): Select all Collapse
oQuery = oServer:Query( cSql )

aFields2:={}; aadd( aFields2, "id" );  aadd( aFields2, "bar" );  aadd( aFields2, "art" );   aadd( aFields2, "price" )
aFormat2:={}; aadd( aFormat2, "" );    aadd( aFormat2, "" );  aadd( aFormat2, "" ); aadd( aFormat2, "" )
aHead2:={} ;  aadd( aHead2, " " );     aadd( aHead2, " " );  aadd( aHead2, " " );  aadd( aHead2, " " )

DEFINE DIALOG oDlg FROM 2, 2 TO 29.7, 88 TITLE "Art..."

@ 01.60,00 XBROWSE oBrw of oDlg OBJECT oQuery COLUMNS aFields2 PICTURES aFormat2 HEADERS aHead2 SIZE 390,186

oBrw:bKeyChar:= {|nKey| ColectChars( chr(nkey),oDlg,oBrw,oQuery ) }   // function to collect string for search


I try also with this code, but can't figure how to change xBrowse dynamically when operator type article name, using query function oQuery = oServer:Query( cSql ).

Thank's

Boris
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)

Continue the discussion