Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete record
Message
De
08/06/2008 20:31:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
08/06/2008 14:53:56
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01322406
Message ID:
01322449
Vues:
12
>Dear all,
>
>How to delete a record from a table, I find that I can't delete a record sucessfully.
>
>Am I?
>Select Myfile
>Delete Myfield="ValueIWantToDelete"
>tableupdate(.t.)
>
>where
>Cursor.BufferModeOverride=3 (or 5)
>
>However, I still see the deleted record in my reocrd page.
>
>I have SET DELETED ON
>
>What I have overlooked ??
>
>It should be unfortunate to 'PACK' everytime I delete a record !
>
>
>Regards,
>
>Ransome

Each table has a record pointer; once you are on the correct record, just give the command DELETE.

If you want to go to the correct record first, you can do something like locate for MyField = ..., before deleting.

If you are on a form, you have to go to another record after deleting - this is not automatic. For example:
* User has already selected the correct record, in the grid for example
delete
skip
if eof()
  go bottom
endif
ThisForm.Refresh()
HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform