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

 Stopping Custom Update after an Error

Print topic Send  topic

Author Message
salvomil

Posts: 5
Posted: 03/18/2008, 7:14 AM

Hi!
My name is Salvo. I'm writing from Italy.

I have a problem when I update a Table.
What I need is to stop a custom SQL when I find a field to null values.

So in my Custom Code in BeforBuildUpdate trigger I have :

bla bla bla....

if ($FILTRI1->OPE_MAN_PRELIEVO->GetValue()=="")
{
$FILTRI1->Errors->addError("1.Occorre selezionare l'operatore manuale!");
$FILTRI1->DT_PRELIEVO->SetValue('');
}
bla bla bla....

Now, when I get this error I need to stop the Custom Update (type is Table). But I don't know how to do this.
Can someone help me please? Thank you.

}
View profile  Send private message
wkempees


Posts: 1679
Posted: 03/18/2008, 7:49 AM

http://forums.codecharge.com/posts.php?post_id=91075&s_keyword=stop+update

Might contain the answer to your question.
Using the Search button on top of forum, I entered "stop update" for you.
Walter

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
DonB
Posted: 03/18/2008, 7:21 PM

You should test the values in the Validate event which enables you to handle
the data before insert,update OR delete al in one place, and to also report
an error back to the user.

--
DonB



"salvomil" <salvomil@forum.codecharge> wrote in message
news:547dfce50a3217@news.codecharge.com...
> Hi!
> My name is Salvo. I'm writing from Italy.
>
> I have a problem when I update a Table.
> What I need is to stop a custom SQL when I find a field to null values.
>
> So in my Custom Code in BeforBuildUpdate trigger I have :
>
> bla bla bla....
>
> if ($FILTRI1->OPE_MAN_PRELIEVO->GetValue()=="")
> {
> $FILTRI1->Errors->addError("1.Occorre selezionare l'operatore manuale!");
> $FILTRI1->DT_PRELIEVO->SetValue('');
> }
> bla bla bla....
>
> Now, when I get this error I need to stop the Custom Update (type is
> Table).
> But I don't know how to do this.
> Can someone help me please? Thank you.
>
> }
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>

salvomil

Posts: 5
Posted: 03/20/2008, 1:58 AM

Thank you guys.

I found useful the link wkempees wrote.
I so can stop updating but can't get Error to user displayed.
So now I try to use the OnValidate Event to allow user to be informed.
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.

Web Database

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.