Suppress messages when executing a procedure

  • I had an example of the syntax I add to the end of an EXEC procName to suppress the message in QA Grids but I can no longer find it.

  • set nocount off/on ?

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Thanks Frank but I was looking for the command which I could add to the end of the EXEC statement which would suppress the messages in the Query Analyzer grid.

  • Stefan,

    which messages do you mean? Can you post an example?

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • In Query Analyzer I am running the following code:

    DECLARE @ReturnStatus int

    Exec @ReturnStatus = procZipFilePassword 'C:\KnowledgeBase\Templates\CompanyPotentials.xls', 'C:\KnowledgeBase\WebTestFiles\CompaniesPotentialsNL','test'

    In the Grids window below I get the following output.

    WinZip(R) Command Line Support Add-On Version 1.0 (Build 3181)

    Copyright (c) WinZip Computing, Inc. 1991-2000 - All Rights Reserved

    Searching...

    Warning: name not matched: C:/KnowledgeBase/Templates/CompanyPotentials.xls

    Error: No files were found for this action that match your criteria - nothing to do. (C:\KnowledgeBase\WebTestFiles\CompaniesPotentialsNL.zip)

    NULL

    In the past I used a command on the end of the EXEC statement to suppress the output in the grids window. I just can't remember or find what it was.

  • The only thing I can think of is NO_OUTPUT if you use xp_cmdshell in your s_proc.

    HTH

     

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Are you talking

    set noexec on

    or

    set parseonly on

  • No, it went on the end of the EXEC statement following a comma. Perhaps I imagined it. It will come to me one day.

  • Frank, I missed your reply above. It was NO_OUTPUT that I was looking for.

    Thanks

Viewing 9 posts - 1 through 8 (of 8 total)

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