Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seeking a local view?
Message
 
 
À
13/01/2000 10:48:08
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00317643
Message ID:
00317668
Vues:
10
>Hi Everyone!
>
>How can I search (preferably a SEEK()) through a local view, without having to index it at run-time?
>
>I use a local view to update a base invoice file. I do this because I use the primary incremantel index key as the actual generated invoice number. I only require this invoice number (primary key) to get incremented if and only if the user decides to save the invoice (TABLEUPDATE()).
>
>It works great, but when trying to find an invoice, to perform and edit, view, void, etc., I would like search through the local view using a seek, since I am using a local view all the time.
>
>This is a multi-user application, so I do not want to creat index files evry time a user enters the invoice file, just to perform a seek.
>
>Is there a solution to this? If not, can I use another search method on a local view, which is fairly fast and efficient?
>
>Thanks in advance!

Ideally, views have very few records [they contain only the records the user needs at that time]. In that case, LOCATE would be fast enough. Otherwise, you have to create an index on the view after opening the view. Since the view is a temporary file, the CDX will also be a temp file of the same name as the view. When you close the view, both temp files disappear. This has no effect on other users and other datasessions that may also use the view. A new temp file is created for each time the view is opened.

Note that indexing can only be done on a record buffered view. So use CursorSetProp('buffering') to switch between record and table buffering of the view as needed.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform