Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local view, delete and requery
Message
De
24/07/2003 03:44:54
 
 
À
18/07/2003 13:29:01
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:
00813024
Vues:
11
>
>Could you provide complete repro code that demonstrates the problem?
>
>Thanks,
>Aleksey.

Well, this code is located at my base maintenance form class, at second page's Activate Method. I needed to requery the view, because I have a grid control on the second page which shows all the records. I wanted to this point to be where new records should be updated.

Before, it was like this:

lcAlias = ALIAS()
IF CURSORGETPROP("SourceType",lcAlias) # 3

REQUERY(lcAlias)

ENDIF

This resulted an empty view if a record was deleted before the requery.

I changed it to:

lcAlias = ALIAS()
IF CURSORGETPROP("SourceType",lcAlias) # 3
SELECT (lcAlias)
REQUERY(lcAlias)

ENDIF

And no more empty view after record deletion... normal behaviour as it should be...

I'm sure that the view was selected also in the first case, because the VFP statusbar indicated my view name after requery. Only that record number was none and in exclusive mode....

If i recall right, you can also reproduce this behaviour opening a local view in command view, then deleting a record from it, then requerying the view = empty view. With my view and my VFP7 SP1, it was the case. After closing all the tables view based on , and re-opening the view, the result was correct. But adding this SELECT seems to help.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform