Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record Pointer Moving after REQUERY
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00290073
Message ID:
00290214
Vues:
35
>Colin,
>
>The values were assigned properly and I was looking at the correct work area and I did do a refresh. The problem with REQUERY() is that it requeries all records and not just the one you are sitting on. It throws out the current cursor and builds a new one.
>
>I am looking at using a parameterized view and then getting the Key ID value from the Stored Procedure to use to Requery(). This way I have only One View. Then when I got to a list tab to view all Records I can then just issue:
>
>cID = ''
>SELECT fields WHERE ID = ?cID
>
>Then when I leave the Grid tab I can then do:
>
>cID = View.ID
>Requery()
>Refresh()

If your syntax is correct here I may have noticed a problem.

First of all, yes REQUERY() builds a whole new cursor.
There is .Refresh the method and REFRESH() the function. REFRESH() the function, will only requery the current record unless you pass other parameters. Look up REFRESH() in help. So what I was suggesting was:


TABLEUPDATE() &&Update base table from view
=REFRESH() or =REFRESH(1,0,'ViewName') &&The REFRESH() function refreshes current view record with base table values
GO RECNO() && Not necesarilly needed but sometimes I find VFP gets "lost" after updates and refreshes. Try without it and if still doesn't work try with it.
ThisFrom.Refresh && The .Refresh method displays all objects current values

This may already be obvious to you but wanted to make sure we are on the same page.
>
>
>I think this might work.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform