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 -> PHP

 Events Returns code does nothing (?)

Print topic Send  topic

Author Message
fausto astudillo
Posted: 12/14/2004, 6:30 AM

I have follow the generated code for a ds (Data source) component and I saw :

       
        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteInsert");  
        $this->query($this->SQL);  
        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteInsert");  
        if($this->Errors->Count() > 0)  
            $this->Errors->AddError($this->Errors->ToString());  
        $this->close();  

. The result of BeforeExecuteInsert event does nothing respect of execution of the Insert Query.
. A good practice shoulb be a validation of CCSEventResult and a conditional execution of the folowwing sentences.
. Actually the solution is to put NULL on the sql sentence inside the BeforeExecuteInsert event to avoid its execution.
. Idem for other events.
Nicole

Posts: 586
Posted: 12/14/2004, 6:46 AM

Hello,
I think that you’re using lower version CCS that I do. I’m using CCS 2.3.2.24 and it provides an ability to fornid sql execution from Before Execute Update/Insert/delete events:
  
        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate");  
        if($this->Errors->Count() == 0 && $this->CmdExecution) {  
            $this->query($this->SQL);  
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate");  
        }  

So you can prevent sql execution assigning an error or setting CmdExecution to false
  
$form_name->Errors->AddError("Error message");  
// or  
$form_name->ds->CmdExecution= false;  
This new feature let you prevent update of a certain row of editable grid.


_________________
Regards,
Nicole
View profile  Send private message
fausto astudillo
Posted: 12/14/2004, 7:22 AM

Hi, Nicole:

Yow have reason. I'm using an older version.
Thanks.

Have a nice season!.

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.