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