![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB Enhancement Requests and Suggestions » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Sun, Mar 30 2014 7:33 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | I would like to be able to access OLDROW values in ALL triggers / have short-circuit boolean testing working.
--------------------------- Debugger Exception Notification --------------------------- Project Diabetes.exe raised exception class EEDBError with message 'ElevateDB Error #1011 An error occurred with the row OLDROW (The row value cannot be referenced in an INSERT operation)'. --------------------------- Break Continue Help --------------------------- CREATE TRIGGER "SetAllValues" BEFORE ALL ON "BloodTests" BEGIN IF OPERATION <> 'DELETE' THEN IF ((OPERATION = 'INSERT') AND (NEWROW._mmolPERl IS NOT NULL)) OR (NEWROW._mmolPERl <> OLDROW._mmolPERl) THEN SET NEWROW._mgPERdl = CAST(NEWROW._mmolPERl * 18.0182 AS INTEGER); ELSE SET NEWROW._mmolPERl = TRUNCATE(NEWROW._mgPERdl / 18.0182, 1); END IF; END IF; END Roy Lambert |
Wed, Apr 2 2014 7:05 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roy,
<< I would like to be able to access OLDROW values in ALL triggers / have short-circuit boolean testing working. >> INSERT triggers do not have an OLDROW - it doesn't exist. And short-circuit boolean testing is a *runtime* decision, not a compile-time decision. IOW, boolean short-circuiting doesn't cause the compiler to skip over certain parts of the code. Tim Young Elevate Software www.elevatesoft.com |
Thu, Apr 3 2014 2:49 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
>INSERT triggers do not have an OLDROW - it doesn't exist. I know and I would expect OLDROW to return NULL for all columns >And short-circuit >boolean testing is a *runtime* decision, not a compile-time decision. IOW, >boolean short-circuiting doesn't cause the compiler to skip over certain >parts of the code. OK bad thinking on my part there, I was assuming that OLDROW might not be populated for INSERT triggers not that it just didn't exist. Roy |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |