TDolphin-xBrowse help or example with dynamic seek please...

TDolphin-xBrowse help or example with dynamic seek please...

Postby bosibila » Wed Jan 30, 2013 5:26 pm

hello everybody,

does someone have example for xbrowse dialog based on Daniels tDolpnin functions:
Code: Select all  Expand view
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: Select all  Expand view
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)
User avatar
bosibila
 
Posts: 53
Joined: Wed Aug 06, 2008 5:27 pm
Location: Osijek, Croatia

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests