Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete Command not working.
Message
De
11/02/2010 09:38:47
 
 
À
11/02/2010 09:30:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01448767
Message ID:
01448784
Vues:
34
>>>>Hello!
>>>>
>>>>IF (MESSAGEBOX('Are you sure you want to delete this client',1,'Delete')) =1 then
>>>>  if thisform.Value = 1
>>>> 	messagebox('Cannot DELETE a record! Only READ access is granted!', 16, 'Security Alert')
>>>> else
>>>>	delete
>>>>	go top
>>>>	messagebox('Record deleted successfully!', 64, 'Information')
>>>>	thisform.refresh()
>>>> endif	
>>>>	ELSE
>>>>	return 
>>>>	
>>>>endif
>>>>
>>>>
>>>>I have this class code which marks records in my record for deleting. It works Fine for every thing.
>>>>but i have this table that is Set Deleted OFF. the problem is. when i delete something it gets marked for deleting. when i check the table. but it still shows up in my table when i run the form again... is there something im missing?cause its my only table that does that
>>>
>>>When you mark record for deletion in VFP, it doesn't disappear from the table. It is only marked and can be recalled. Only when you issue pack command (and this command requires exclusive access to the table) the record is physically gone.
>>
>>Yea i know that but when its marked isnt it NOT supposed to show up when i call the table ?cause when i mark other stuff they dont show up in the Exe but when i browse the tables i see the little black boxes by them.and i can pack when i need to. but im thinking because im using my tables DIRECTLY IN the exe its gonna show even if its marked or not
>
>It is not supposed to be showing when Set("Deleted")="ON". With off, everything shows. Also, the scope of the settings is "all aliases in the current data session", not per table.
>
>BTW, you may want to rethink your logic - why offer to delete and then ask a question, and only then say "you can't delete this"? Why not just disable the delete button in such cases?

Well when buffering mode is on PEssimistic. even if set deleted is On it does get deleted but "Comes back" when the form is loaded again. but buffering mode 0 seemed to take care of that.

and about my Logic..i can do
this.enable if thisform.value <>1
i guess? but..its not wrong-ish to have it how i do ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform