Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record deletion question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00419306
Message ID:
00419463
Vues:
19
My guess is that the record pointer was at EOF() when you issued the DELETE command. The default scope of the DELETE command is NEXT 1. If you had put the same conditional "alltrim(tblbranchadmin.branchnumb) = alltrim(thisform.brnumb)
" as part of a FOR clause in your DELETE command it would have worked because then the default scope would have been ALL (that met the conditional). Instead you used SQL - DELETE which operates on all of the records that meet the WHERE condition.

>I got the thing working bu using the following to delete the record . .
>
>delete from tblbranchadmin where alltrim(tblbranchadmin.branchnumb) = alltrim(thisform.brnumb)
>
>... instead of just 'delete'
>
>>I'm having trouble deleting a record with the following code:
>>
>>***********************************
>>
>>*cmdDelete.click
>>
>>use tblBranch in 0 again alias countbranch
>> count to thisform.records
>>use in countbranch
>>
>>select tblbranchadmin
>>
>>
>>if thisform.records = 1
>>=messagebox("There must be at least one branch - Branch record will not be deleted !";
>> ,64,"SWITCH Reconciliation")
>>else
>> if messagebox("Are you sure you want to delete this Branch",;
>> 256+4+32,"SWITCH Reconciliation") = 6
>> delete && RECORD IS NOT BEING MARKED FOR DELETION !!
>> go top
>> thisform.brname = alltrim(tblbranchadmin.branchname)
>> thisform.brnumb = alltrim(tblbranchadmin.branchnumb)
>> thisform.refresh()
>> endif
>>endif
>>
>>***************************
>>
>>Are there any system settings that would prohibit the deletion of a record? I'm probably overlooking something very simple but I can't see it.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform