I’m having a problem outputting a variable in my assembly.
- Do I need to add a
out string var1to the parameter list of the function in C#? I get an error – something related tovar1not being set… - I tried
parameter.Direction = ParameterDirection.Output - I can’t find any good examples
Edit: My assembly SP currently returns a recordset… I want it to output some variables so that I can use them in another SP where this is called from.
I.E.
DECLARE @var1 int EXEC dbo.MyAssemblySP @var1 OUTPUT PRINT @var1
Not quite sure what you are trying to do, but if you are trying to use the
outkeyword, here is the proper syntax:Calling
foo2will result in the console writing1.