checking on some restrictions related to functions

  • hi i'm helping a friend on his creation of a function.   here are the issues...

    1. he's getting an error setting nocount on.  i told him that is only a proc thing as far as i know.   is that correct?

    2. he's getting an error setting xact abort on.   i was a little surprised by this.   wlll that be handled by the caller anyway?

    3. he's getting an error having a try catch.   why is that?   will it at least be handled by the caller?

  • all those are not available to use within functions of views - so only within batch SQL or within a SP - and with regards to 3 - yes the caller is responsible to catch any errors that occur within the code between try/catch blocks if any. if no try/catch then the application executing the sql statements will get the errors back.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply