CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 How can I trigger other code based on a CCS action?

Print topic Send  topic

Author Message
JimmyCrackedCorn

Posts: 583
Posted: 05/10/2007, 11:42 AM

I have an orders table but the orders are actually only requests until they have been reviewed and approved. Therefore, each order has a status flag set to R for request when the order is placed and A for approved when it is accepted. I'm getting all of that done just fine in CCS.

But, my products table has only a limited number of each product and I maintain a counter field for each product record. This field is not decremented when a customer places their order (status = R) but when their order is accepted (status = A) I need to trigger code to do the decrementing.

This would be simple and straightforward in hand-coding but I'm not sure how to implement in CCS. Any ideas on this?
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
Benjamin Krajmalnik
Posted: 05/10/2007, 5:54 PM

I would use the AfterUpdate event to trigger the SQL.
However, you need to know what the original state was, because if it was
already "A" you do not want the code to trigger.
OR, if you are using a SQL database which has trigger capabilities, I would
do it there, in a before update trigger.

"JimmyCrackedCorn" <JimmyCrackedCorn@forum.codecharge> wrote in message
news:24643679a7ebac@news.codecharge.com...
>I have an orders table but the orders are actually only requests until they
>have
> been reviewed and approved. Therefore, each order has a status flag set to
> R for
> request when the order is placed and A for approved when it is accepted.
> I'm
> getting all of that done just fine in CCS.
>
> But, my products table has only a limited number of each product and I
> maintain
> a counter field for each product record. This field is not decremented
> when a
> customer places their order (status = R) but when their order is accepted
> (status = A) I need to trigger code to do the decrementing.
>
> This would be simple and straightforward in hand-coding but I'm not sure
> how to
> implement in CCS. Any ideas on this?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>


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.