Nocount and Extended Stored Procs

  • I am trying to switch off the annoying message

    (1 row(s) affected)

    That I get after each call to an Extended Stored Proc. Using Set Nocount ON has no effect. Is there another way of switching this message off.

    I have to call an extended sp lots of times in an sp, the messages significantly dilute the output.

    Thanks

  • I find that this does suppress the count messages:

    set nocount on

    exec master..xp_cmdshell 'dir *.txt'

    How are you calling the extended proc? By the way, I'm on SQL 2000.

    -Dan


    -Dan

  • I'm on sqlserver 7.

    The command(s) that I am using are :

    set nocount on

    declare @value varchar(128)

    set @value = 'some string'

    exec master..xp_encrypt @value OUTPUT

    The xproc xp_encrypt is calling a C dll that was written by a developer in my company.

    Although if I substitute xp_cmdshell for xp_encrypt I still get the message.

    Thanks

    Ian

  • I think this is related to the SQL Version, I do it with xp_cmdshell and the count does not return in SQL 2K but does with SQL 7. I do believe, thou, there is something that can be done in the XP dll to suppress the message, but I could be wrong an I cannot find the reference I am looking for. Have you developer check.

  • I've just found the answer.

    In hhe call to srv_senddone you can set a flag SRV_DONE_COUNT that says there is a valid number in the count field. I got the developer to remove this flag, and hey presto no message.

    cheers

    Ian

Viewing 5 posts - 1 through 4 (of 4 total)

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