Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement