Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: mohammed qasem
  Where is mohammed qasem?
 amman
 Jordan
 mohammed qasem
 To: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 Tags
Subject: RE: interactivechange
Thread ID: 189291 Message ID: 189305 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Other
Date: Thursday, August 14, 2008 10:49:10 AM         
   


thank you for reply,

you are write, is there another way to rewrite this code under lostfocus event or another events

to be faster.....

i made index as
index on name1 tag name1
index on name2 tag name2
index on name3 tag name3
index on name4 tag name4

> > 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
>
> Hi Mohammed,
>
> Pardon me for not remembering if it is you or anybody who posted last time I responded to the same question. But the answer I gave to that one is the same with what I will give here.
>
> Your intention it is not advisable to do so under interactive change. Interactive change will respond to every key stoke that a user will make and since you are running an SQL Select, it will considerably slow down your app.
>
> Interactive change have other usage, this one IMHO is not among them.
>
> -- Added --
> I am not saying that it cannot be used, you can use it if you like, but i am just expressing my opinion that it is not good.
>
> Jun Tangunan
>
> "Get out of the past and look in the future."
> http://weblogs.foxite.com/sandstorm36/

ENTIRE THREAD

interactivechange Posted by mohammed qasem @ 8/14/2008 9:39:28 AM
RE: interactivechange Posted by Jun Tangunan @ 8/14/2008 10:13:21 AM
RE: interactivechange Posted by mohammed qasem @ 8/14/2008 10:49:10 AM
RE: interactivechange Posted by Jun Tangunan @ 8/14/2008 3:48:21 PM