Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record Pointer Best Practice
Message
From
27/07/2001 10:55:32
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
27/07/2001 10:03:55
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00536306
Message ID:
00536422
Views:
10
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform