Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Key or Set Filter
Message
 
 
À
31/08/2003 20:02:34
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00824929
Message ID:
00824994
Vues:
21
Hi James,

I also thought about doing requery() on each change of row. But since I don't have real client server applications I have no feel on how it will slow the user on each row. But from the programming stand-point, I like your approach better, no need for SET KEY TO < > and then unSET KEY.

And since you are suggestion it, and you have experience, I will go with your suggestion.

Thank you very much for your help.


>Hi Dmitry
>
>If you use SET KEY or SET FILTER you would have to get all the contacts for all the companies that the user queried. This would make your app start very slow. I have always believed that a client server system should query the least amount of data as possible. This sometimes changes the way VFP apps work. You need to get the contacts from sql server when the user needs them. What I do in this instance is to requery() the view each time a row changes on the V_company view.
>
>>I am trying to decide if I should use Set Key or Set Filter or something completely different for the following situation:
>>
>>Company Table (parent) and CompanyContact Table (child) are displayed on the same form. Company fields are displayed in textboxes and contact are in a grid.
>>
>>Since the data is in SQL Server database, I created two views: V_COMPANY and V_CONTACT. I retrieve, say 100, company records into the views. Then user can navigate through the records in the company view by clicking on Next/Priv. buttons.
>>
>>To display Contracts from the V_CONTACT in the grid I need to restrict them for the currently displayed company.
>>
>>Should I use SET KEY TO or SET FILTER TO or is there a different and better method?
>>
>>TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform