why I can't see the output of sp_executesql?

  • Hello

    I run code bellow.

    declare @SQLstring nvarchar(max) , @ExeCommand nvarchar(max),@OutString nvarchar(max)

    set @SQLstring = ' EXEC [dbo].[xmlGenerate] 20, 100001, 1 '

    EXEC sp_executesql @SQLstring , N'@OutString nvarchar(max) output', @OutString=@ExeCommand output

    select @ExeCommand

    select @OutString

    I can't see the out put XMl, when I " select @ExeCommand " or select "@OutString[/code]"

    it returns NUll.

  • bkshn (12/22/2013)


    Hello

    I run code bellow.

    declare @SQLstring nvarchar(max) , @ExeCommand nvarchar(max),@OutString nvarchar(max)

    set @SQLstring = ' EXEC [dbo].[xmlGenerate] 20, 100001, 1 '

    EXEC sp_executesql @SQLstring , N'@OutString nvarchar(max) output', @OutString=@ExeCommand output

    select @ExeCommand

    select @OutString

    I can't see the out put XMl, when I " select @ExeCommand " or select "@OutString[/code]"

    it returns NUll.

    I don't see the output of the dbo.xmlGenerate procedure being put into the @OutString variable.

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

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