Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a view
Message
From
25/11/2001 08:15:15
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
23/11/2001 15:09:05
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00585210
Message ID:
00585481
Views:
26
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?
Previous
Reply
Map
View

Click here to load this message in the networking platform