SQL Server Performance

JAVA calling SQL Server Procedure

Discussion in 'Getting Started' started by lcerni, Aug 30, 2010.

  1. lcerni New Member

    I have a JAVA developer asking me this question. I am not sure how to answer him. I am not sure I understand his question. He is using JAVA to call my procedure.
    "Is there some conclusive signal returned by the the SP result that would letus know whether it succeeded or failed? I'm currently looking for the word "exception" in the error message, but that hardly seems conclusive to me."
  2. Luis Martin Moderator

    Check:
    http://www.sommarskog.se/error-handling-II.html
    http://www.sqlteam.com/article/handling-errors-in-stored-procedures
    HTH
  3. lcerni New Member

    I have my code coded as "EXEC master.dbo.xp_cmdshell @cmdline". If I had it coded as "EXEC @returncode = master.dbo.xp_cmdshell @cmdline, NO_OUTPUT", would that help him?
  4. satya Moderator

    How that SP is called at the Application?
    I believe using the common calls procedures you can use OUTPUT from SP too.
  5. lcerni New Member

Share This Page