Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record Pointer Best Practice
Message
De
27/07/2001 10:59:34
 
 
À
27/07/2001 10:55:32
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00536306
Message ID:
00536426
Vues:
9
This message has been marked as a message which has helped to the initial question of the thread.
>>Whay wait till editing is done to start restoring record pointers? Maybe I am misunderstanding your situation, but I would restore them just after querying the subsequent views.
>
>An example from my app that displays this is the code below used when a record is deleted. I guess my use of Requery() makes me feel I'm forced to keep track of the pointer for the different views. Am I misusing the Requery() in-as-much as where/when I call it?

I don't think that you need to call it after you issue a TABLEUPDATE, unless you are providing for the possiblity of another user updating the record in that time.

Also, the code in the inner ELSE clause attempts to revert changes in a view that have already been committed. Perhaps you mean to revert changes to the table instead?

As an aside, I try to avoid double-buffering whenever possible for exactly these reasons- handling two-level updates gets messy.

>
>Select View1 && Editable one-record view
>Delete
>If TABLEUPDATE(.T.,.T.,'View1')
>   If TABLEUPDATE(.T.,.T.,'BaseTable') && Buffered base table
>      Requery('View1')
>      Sele View2
>      ThisForm.nRecNoView2 = ThisForm.nRecNoView2 -1
>      Requery('View2')
>      GOTO ThisForm.nRecNoView2
>      Sele View3
>      Requery('View3')
>      GOTO ThisForm.nRecNoView3
>   Else
>      TableRevert('View1')
>      Wait WINDOW 'Deletion Failed!' TIMEOUT 2
>   Endif
>Else
>   TableRevert('View1')
>   Wait WINDOW 'Deletion Failed!' TIMEOUT 2
>Endif
>
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform