Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete already!
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00130334
Message ID:
00130492
Vues:
44
>>I made the assumption of a relation between parent and child table where the record pointer would be at the first child record that needs deleting. *Delete for child.key = parent.key* should be just as efficient since you have an index on the child key. I got in the habit of *delete next 1* when I started writing multi-user code because of implicit record locking. It also reaffirms to me that I am only wanting to explicitly delete the current record and not move the record pointer. I do not think it makes a difference in your case.
>
>Well, what I'm deleting is not from a child table, so there's no relation set up. The main record that's being deleted is a trip. So I have to go delete that trip out of the trip history file to match. Then I have to find what payments have been made on the trip and delete those and issue a credit for that much.
>
>Does just "delete" move the record pointer? If it does, then it would make a difference because I want the pointer to move.
>
>Thanks,
>
>-Michelle

Just delete does not move pointer. You would have to issue a *skip* or *skip -1* to move it. Only *Delete for/while* moves the pointer. Delete for will move pointer to eof(). Delete while starts deletion on the current record and moves down the table while the delete criteria is met. If it is not met on the initial record, it does not move at all and nothing is deleted. There is also a *Delete rest* option that deletes the rest of the records in the table starting with the current record.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform