I've moved...

This blog now has a new home - please update your shortcuts and readers to: www.jeffkemponoracle.com. Sorry for any inconvenience!

Monday, March 10, 2008

TOO_MANY_ROWS side effect

I used to assume that whenever a TOO_MANY_ROWS exception is raised, the target bind variables would be left untouched. Until today I've never written any code that relies on the bind variables being in any particular state when a TMR exception is raised, so was surprised.

[Full Article]

1 comment:

  1. >> beware of performing a SELECT INTO
    >> directly on the OUT parameters of
    >> your procedure!

    There's a more general piece of best practice advice, which is to only populate OUT parameters just before the end of the procedure. In the middle of the procedure we should use local variables. It's the only way to guarantee the state of the variables in the event of error.

    Cheers, APC

    ReplyDelete

Note: Only a member of this blog may post a comment.