Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a view
Message
De
25/11/2001 08:15:15
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
23/11/2001 15:09:05
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00585210
Message ID:
00585481
Vues:
28
Hi Steven

I'm not certain Jim's answer is what you're looking for. He's correct in that you can index a view. You'll probably also need to learn about switching to row buffering with CursorSetProp("Buffering",3) and back prior to the index. However, as Jim taught me when I was still griping about the grid's lack of support for filters, the whole point to views is to extract only the records you need via parameters. If the table you plan to do a seek in has 10,000 records, you won't like the performance of pulling the 10,000, indexing them and then doing a seek. That kind of seek IMO would be done on small record sets or lookup tables.

If you're working with a customer table, you'd create a view like this...

create sql view v_Customers as select * from customers where cus_id = ?lcCus_ID

In your form.load you'd USE v_Customers NODATA.

and then via some means, you'd have to find out what the user is looking for and apply that search criteria to the memory variable lcCus_ID followed by a requery("v_Customers").


>I am new to using views. When I use a table I use the Seek() command to go directly to a record using the index. How do I do this in a view?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform