Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interactivechange
Message
From
14/08/2008 05:37:02
 
 
To
14/08/2008 05:14:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01338786
Message ID:
01338801
Views:
16
If you have index tags for all the nameX fields, the response shold be very, very fast.
By the way, I notice that you keep setting the grid's RecordSource, which I have showed you before that you should NOT do! Instead you select into a "dummy" cursor, like this:
Select **** into cursor curDummy readwrite
Select lcResultTable
zap
append from dbf('curDummy')
go top
thisform.grid1.refresh()
>thank you for reply,
>You have to choose here, either very slow in InterActiveChange, or fast in LostFocus.?LostFocus
>
>is there another way to rewrite the code below to make it faster,
>
>
>
>>You have to choose here, either very slow in InterActiveChange, or fast in LostFocus.
>>
>>>thank you for reply
>>>what, exactly, does not work in interactive change? it works but very slow
>>>
>>>Anyway, I would no appreciate such time consuming stuff on every keystroke. It makes the interface slow if it rereads the data and rebuild the whole grid evertime.? any small example
>>>
>>>
>>>
>>>
>>>
>>>>Mohammed,
>>>>
>>>>what, exactly, does not work in interactive change?
>>>>
>>>>Anyway, I would no appreciate such time consuming stuff on every keystroke. It makes the interface slow if it rereads the data and rebuild the whole grid evertime.
>>>>
>>>>Agnes
>>>>>hi all,
>>>>>
>>>>>this code below works under event lostfocus is there away to works under event interactivechange or rewrite it
>>>>>
>>>>>
>>>>>SET EXCLUSIVE off
>>>>>SET EXACT on
>>>>>SET TALK OFF
>>>>>SET NOTIFY OFF
>>>>>
>>>>>
>>>>>             lcName1 = alltrim(thisform.text1.value)
>>>>>             lcName2 = alltrim(thisform.text2.value)
>>>>>             lcName3 = alltrim(thisform.text3.value)
>>>>>             lcName4 = alltrim(thisform.text4.value)
>>>>>
>>>>>DO case
>>>>>
>>>>>    CASE lcName1<>"" AND lcName2 <>""   AND lcName3 <>"" AND lcName4<>"" AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName2)) >= 3 AND LEN(ALLTRIM(lcName3)) >= 3 AND LEN(ALLTRIM(lcName4)) >= 3
>>>>>           Select F4,F1,name4,name3,name2,name1 from x2 where   name1=lcName1 AND name2=lcName2 AND  name3=lcName3 AND  name4=lcName4;
>>>>>                                  into cursor lcResultTable
>>>>>
>>>>>
>>>>>    CASE lcName1<>"" AND lcName2 <>""   AND lcName3 <>"" AND lcName4=="" AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName2)) >= 3 AND LEN(ALLTRIM(lcName3)) >= 3
>>>>>           Select F4,F1,name4,name3,name2,name1 from x2 where   name1=lcName1 AND name2=lcName2 AND  name3=lcName3 ;
>>>>>                                  into cursor lcResultTable
>>>>>
>>>>>
>>>>>
>>>>>    CASE lcName1<>"" AND lcName2 <>""   AND lcName3 =="" AND lcName4==""  AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName2)) >= 3
>>>>>           Select F4,F1,name4,name3,name2,name1 from x2 where   name1=lcName1 AND name2=lcName2 AND  name3=lcName3;
>>>>>                                  into cursor lcResultTable
>>>>>
>>>>>
>>>>>
>>>>>    CASE lcName1<>"" AND lcName2 ==""  AND lcName3 =="" AND lcName4==""  AND LEN(ALLTRIM(lcName1)) >= 3
>>>>>           Select F4,F1,name4,name3,name2,name1 from x2 where name1=lcName1 ;
>>>>>                                  into cursor lcResultTable
>>>>>
>>>>>    CASE lcName1<>"" AND lcName2 ==""  AND lcName3 =="" AND lcName4<>""  AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName4)) >= 3
>>>>>           Select F4,F1,name4,name3,name2,name1 from x2 where name1=lcName1 AND  name4=lcName4;
>>>>>                                  into cursor lcResultTable
>>>>>
>>>>>
>>>>>
>>>>>    CASE lcName1<>"" AND lcName2 ==""  AND lcName3 <>"" AND lcName4==""  AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName3)) >= 3
>>>>>           Select F4,F1,name4,name3,name2,name1 from x2 where name1=lcName1 AND  name3=lcName3;
>>>>>                                  into cursor lcResultTable
>>>>>
>>>>>
>>>>>    CASE lcName1<>"" AND lcName2 ==""   AND lcName3 <>"" AND lcName4<>"" AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName3)) >= 3 AND LEN(ALLTRIM(lcName4)) >= 3
>>>>>           Select F4,F1,name4,name3,name2,name1 from x2 where   name1=lcName1 AND name3=lcName3 AND  name4=lcName4 ;
>>>>>                                  into cursor lcResultTable
>>>>>
>>>>>
>>>>>
>>>>>  endcase
>>>>>
>>>>> GO top
>>>>>                                         thisform.Grid1.RecordSource="lcResultTable"
>>>>>                                         thisform.grid1.Visible=.t.
>>>>>
>>>>>
>>>>>
>>>>>thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform