Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete record in cursor created with CA
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01477582
Message ID:
01477603
Views:
37
>First the explanation of why. I have a column REC_ID with the value of '0' for "non-deleted" records. When user deletes a record, I don't want to delete it but change the value of REC_ID to "D". So, on command to delete a record (user thinks he/she actually deletes), the program changes the value of REC_ID to "D", sends TABLEUPDATE(). This updates the base table and therefore on the next reload of the CA the record will not be shows to the user. But immediately upon setting the value of base record column REC_ID to 'D' I want to remove this record from the cursor. I suppose the above code you suggested should work. Thank you.


Then you you should use and easier way :-)))))))))))))))
Every CA have a DeleteCmd property.
You should made it something like that:
this.DeleteCmd = "UPDATE YourTable SET Rec_Id = 'D' WHERE PK_Field = ?"+this.Alias+".PK_Field" 
*** Just change PK_Field to the real name of that field
Then delete your records in CA and use TableUdpdate as you wish.
(this is NOT tested)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform