Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record Pointer Best Practice
Message
De
27/07/2001 10:55:32
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
27/07/2001 10:03:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00536306
Message ID:
00536422
Vues:
9
>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'm trying to develop the right way, so I want to know the right way to handle these basic concepts (which I thought I knew, but am finding out I really don't). No thin skin here, BTW; let me know what you think...
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform