Not knowing when the trigger were being called, even the COUNT would be
'dinged' if there is an active SELECT list.  That would be a problem!

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Allen Egerton
Sent: Thursday, April 21, 2011 11:57 AM
To: U2 Users List
Subject: Re: [U2] Very Weird Trigger Behavior

On 4/21/2011 11:03 AM, jonathanm wrote:
> 
> Hi, all. I'm new to this forum, but have been programming multivalue
database
<snip>

> I really need to have it perform the intended check before deletion. Any
> ideas?

Your execute of the SELECT will potentially result in an active select
list that doesn't appear to be intentionally used.  Since you don't want
 the ids, you just want to know if there are any, I'd do something like:

CMD - 'COUNT TRADES WITH TRADE_CODE = "': CODE_DEF_ID: '"'
EXECUTE CMD CAPTURING CMD.CAP RETURNING CNT.SELECTED
IF (CNT.SELECTED GT 0) THEN
    EXECUTE_STATUS = 0
END ELSE
    EXECUTE_STATUS = ????
END

I also don't know what you're doing with EXECUTE_STATUS, but if it's not
set by the caller, it needs to be set here, otherwise its value is
undetermined, (and in most cases will be set to null).



_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to