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

 How can I cancel this insert operation?

Print topic Send  topic

Author Message
ccsnewbie
Posted: 01/06/2006, 2:21 AM

I add the code below to the Record beforeInsert custom event in order to cancel the insert operation when Two certnos are different .
if ( e.getRecord().getControl("certno1").getValue() != e.getRecord().getControl("certno2").getValue() )
e.getRecord().addError("Two certnos are different !");

But the Insert Operation still performs, How can I cancel this insert operation?
ccsnewbie
Posted: 01/06/2006, 2:27 AM

I add the code below to the Record beforeInsert custom event in order to cancel the insert operation when Two certnos are different .
if ( e.getRecord().getControl("certno1").getValue() != e.getRecord().getControl("certno2").getValue() )
e.getRecord().addError("Two certnos are different !");

But the Insert Operation still performs, How can I cancel this insert operation and direct back to the original web page with Error message on it?
matheus

Posts: 386
Posted: 01/17/2006, 5:35 AM

Use on event OnValidate.
_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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