Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this possible?
Message
From
30/08/1999 15:10:12
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00259224
Message ID:
00259330
Views:
18
>>Given an optimistic table buffered cursor against an updateable view:
>>
>>Suppose the cursor has already been queried , and changes made by the user.
>>
>>There is an existing record in the base table, that was not included in the query and thus is not in the cursor against the view.
>>
>>Is there a way to add this existing record to the cursor without requerying the view?
>>
>>My guess is no -- but there are people on this thread who do amazing things.
>
>You could try:
>select * from basetable where _filter_criteria_used_in_current_view ;
>  and Basetable.KeyID not in (select keyid from CurrentView) ;
>  into cursor crsTemp nofilter
>select CurrentView
>append from dbf("crsTemp")
Thanks -- but this just adds a new copy -- one which cannot be put back into the base table because of key violations. The problem is that vfp know which records came with the query results and which are a result of adds or inserts or append from. New records get put into the base table with an insert clause, old with an update (or a delete insert if you so choose).

What it would take to do this is some way of fooling VFP into thinking the inserted, or appended records in the cursor came with the original query.

I'm beginning to think the best way to do this is
1) save my orignal results in a temporary cursor
2) tablerevert and requery my view
3) update the requeried view with data from my temporary cursor.

Alternatively I could do what some people have suggested and make the views read only and update base table from them manually. This will make future upsizing much harder.
Thanks

Gar W. Lipow
Previous
Reply
Map
View

Click here to load this message in the networking platform