Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Buffer my local view?
Message
 
To
30/03/2000 14:26:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00352746
Message ID:
00352906
Views:
9
Ok, you can create another view that either has all the records in it or a subset of the ones you need. A view is just a cursor so you can index the view and still do the seek just like it's a table. After all the view records have been updated you can tableupdate the view.

hth

>Well, my view is parameterized based on the record that the parent table is sitting on, it uses the key field. My batch updates will run on a series of records not just the records in the parameterized view. The batch update currently rolls through a cursor and then seeks the record in my table and updates it one at a time. Think of it like an AR posting that is done once a day based on that days activities.
>
>Thanks, Chris
>
>
>It all depends on what you are doing. Personally I use views and SQL select exclusively.
>
>The reports don't need to change any data so it shouldn't apply there. You can SQL select any data you want, and run the report.
>
>The batch updates could be run against a view as well, couldn't they? The view can contain all the rows and columns in the base table.
>
>hth
>
>>Thanks for the quick response! There is one other aspect to this. There are other things going on in the system that needs access to the entire table not the parameterized local view, like reports and batch updates. So, there will be activity on the table in addition to activity on the view. Does your method still appy?
>>
>>Thanks, Chris
>>
>>Hi Chris,
>>
>>You don't want to open the table, you only want to open the view. And you only want to set the buffering on the view, NOT the table.
>>
>>Think of views as updatable pictures of your tables. You use the view, make changes to the data in the view. Then you can save the changes in the view back to the table (tableupdate) or discard those changes (tablerevert).
>>
>>If you open the view and the table and they are both buffered. You will have to tableupdate the view (which will apply those changes to the buffered table) and then tableupdate the table as well.
>>
>>With views VFP will open the underlying tables by itself, there is no need for you to do it.
>>
>>Look here in the KB for article#442 'Data Buffering in Visual FoxPro' by John Koziol. Click the KB link in the left frame, click articles, the VFP in general. It explains buffering and views and should help you out.
>>
>>hth
>>
>>
>>>When using a local view, what is the best way to open the table and the view? Do I set buffering on my table and view, or just my table, or just my view? The view will be used to view and edit info. Also is best to insert new records into my view or table and requery my view?
>>>
>>>Thanks Chris
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform