Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local view, delete and requery
Message
De
18/07/2003 13:29:01
 
 
À
17/07/2003 02:24:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00805198
Message ID:
00811565
Vues:
15
>>Hello everybody,
>>
>>I have problems with local views. I'm using VFP 7.
>>
>>I have opened a local view normally in my form. When I delete a record from the view (using DELETE command) and then requery the view with REQUERY() function, all the records are gone (the view is empty, which it really shouldn't be).
>>
>>I can replicate this behaviour also opening view manually (command window). When I browse the base tables, the deletion is successful, the right records are deleted from the base tables. Also I can get the view result correctly when I close all the base tables and open the view again. But I can't do this when the form is active (or can I?).
>>
>> The view is row buffered and there are RI triggers on delete in the view's base tables. I've checked out a couple of UT threads concerning this issue, but no help there. I have also tried to disable RI triggers and do TABLEUPDATE after DELETE as suggested in the threads, but no luck there either.
>>
>>Thanks in advance,
>
>
>Hi,
>
>I have managed to deal with this problem. After deletion of a record in a local view, in order to requery the view with REQUERY() function, you must re-select the view i.e.:
>
>&& the view is selected now
>DELETE
>&& the view is still selected, but requerying without selecting again after && deletion will result an empty view
>&& so let's first re-select it
>SELECT view
>
>REQUERY()
>&& view requeried successfully
>
>Quite simple solution to a problem that gave me quite a lot of headache... :)


Hi Tapani,

Could you provide complete repro code that demonstrates the problem?

Thanks,
Aleksey.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform