Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Bong Bungalan
  Where is Bong Bungalan?
 gensan
 Philippines
 Bong Bungalan
 Tags
Subject: RE: Adding Header.Click() event at runtime
Thread ID: 268547 Message ID: 268627 # Views: 23 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Tuesday, July 13, 2010 4:23:10 PM         
   


> Hi stefan,
>
> By chance of trial and error and googling, i've come up with almost the same modifications exept of that [collate 'machine']. How important it is? Also, I indexed all the Fields included (though there are fields that are not necessary to include) to avoid the error when I click on the header which is not indexed. Will this case affects the performance if by chance this view will hold hundreds of thousands records?
>
> thanks,
> bong
> >
> > Since Vfp Views cannot have persistent index tags, you'd need to Index On at run time.
> > Assumed you are opening your view in yourForm.Load(), you can for example index it right afterwards:
> >
> >
> > Local lnSelect
> > lnSelect = Select(0)
> > && ....
> > 
> > Select 0
> > Use myView
> > Index On x Tag x Collate 'machine'
> > Index On y Tag y Collate 'machine'
> > && ....
> > 
> > Select (m.lnSelect)
> > 

> >
> >
> > form.Load() is a very early event, and you can do the indexing later too (it just needs to happen before your code would try to use any of the index tags).
> > However, if you are doing it later, and if the current Buffer Mode of your View's alias is not default mode 3 anymore, you'd need to reset it temporarily for the Index On commands via CursorSetProp()
> >
> >
> >
> > hth
> > -Stefan

You should not be creating indexes on hundreds of thousands of records. If the backend is VFP, then the view will get records as needed. But by indexing them, you are downloading all the records over the network which can decrease the performance. Why do you need so many records in the view?

Regards
Tushar

ENTIRE THREAD

Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 8:15:49 AM
RE: Adding Header.Click() event at runtime Posted by Bhushan Sahni @ 7/13/2010 8:20:56 AM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 8:33:49 AM
RE: Adding Header.Click() event at runtime Posted by Bhushan Sahni @ 7/13/2010 8:35:09 AM
RE: Adding Header.Click() event at runtime Posted by Stefan Wuebbe @ 7/13/2010 8:37:29 AM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 9:12:34 AM
RE: Adding Header.Click() event at runtime Posted by Stefan Wuebbe @ 7/13/2010 10:00:19 AM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 2:18:31 PM
RE: Adding Header.Click() event at runtime Posted by Stefan Wuebbe @ 7/13/2010 3:29:19 PM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 3:52:15 PM
RE: Adding Header.Click() event at runtime Posted by Stefan Wuebbe @ 7/13/2010 4:17:35 PM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 4:31:10 PM
RE: Adding Header.Click() event at runtime Posted by tushar @ 7/13/2010 4:23:10 PM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 4:37:24 PM
RE: Adding Header.Click() event at runtime Posted by tushar @ 7/13/2010 4:43:17 PM
RE: Adding Header.Click() event at runtime Posted by tushar @ 7/13/2010 8:46:25 AM