CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Possible Way for Soft Deletes on Forms

Print topic Send  topic

Author Message
marcwolf


Posts: 361
Posted: 08/15/2005, 6:55 PM

This folks is just a suggestion of what we do when we need to put in a Soft Delete

We often just want to do a soft delete and have a batch of code for updateing Version Numbers, Dates, User ID etc in the BeforeUpdates.

However we have to somehow translate this into a Custom SQL for the delete. And it can be a real pain.

However - If you add this code into the BeforeExecuteDelete then you can save a lot of hassle.

Here is the Code

  
with applic_topic1  
     .deleted_fl.value = 1  
     .updaterow  
     .command.CommandOperation = 9  
End With  

How does it work.

If applic_topis is the form we set the soft deleted flag to 1
then we call the UpdateRow routine the will update the record with the correct data together with any updates to Dates, Userid etc
Then we send a '9' to the command object, which confuses it (nicely) and so it does not do the physical delte of the record.

So Soft delete easily within code, and no custom SQL etc ever needed.

Hope this helps someone

Dave
_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.