Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
Trigger question |
Thu, Apr 23 2009 10:48 AM | Permanent Link |
"James Relyea" | I'm doing some final data validation with "before" triggers. If they =
fail the validation, is there any way to cancel the SQL execution? I'm = familiar with something like "Instead Of" trigger functionality. Essentially at the moment, I have to ensure certain records to not get = deleted. If someone attempts a deletion, a before delete trigger fires. = The trigger verifies the deletion is not for 1 of the "golden" records. = I'm trying to figure out how to scrap the deletion of the record is not = supposed to be deleted.=20 I could probably change the field value in the where clause of the = delete statement to an invalid value and the delete would continue but = wind up deleting nothing; this seems like a really sloppy way though = because the engine still has to search for the matching record to the = where clause. I don't want to do it this way. thanks jr |
Thu, Apr 23 2009 4:58 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | James,
<< I'm doing some final data validation with "before" triggers. If they fail the validation, is there any way to cancel the SQL execution? >> Sure, just raise an exception in the trigger: http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=13&topic=224 -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |