I have the following stored procedure
CREATE PROCEDURE [dbo].[usp_GetData]
@foo VARCHAR (20), @bar bit = 1
AS ...
This provides the correct result when called in SSMS.
EXEC dbo.usp_GetData @foo = 'Hellow World', @bar = 0
Although when calling within a C# application as per below
cmd.Parameters.Add(new SqlParameter("@foo", foo));
cmd.Parameters.Add(new SqlParameter("@bar", 0));
& is captured by the profiler as below.
exec dbo.usp_GetData @foo=N'Hello World',@bar=default
Does a parameter that overides the default have to be passed differently?