We're in the midst of migrating an older C# application to the latest version of C# (and .NET framework) and have come across a problem during testing. Nothing earthshattering - just basic data access code.
Specifically, we're creating a SqlParameter called '@BalanceForward'. In this particular case, we're setting the value to zero - although it could obviously be other values. When executing the stored procedure, we're getting back an error that the procedure expected a parameter called '@BalanceForward' but it wasn't specified. Odd.
We ran a SQL trace and saw the following...
exec usp_Transaction_Create @Id='dummy value',@BalanceForward=default
As you can see, the zero dollar amount is being changed behind the scenes to 'default'. It must be a .NET framework change in behavior - looking at the SQL trace from the version still in production, the zero dollar amount is passed as 0.00.
Is there a way to disable this and just have it pass the actual value instead of 'default'? We don't really want to go through hundreds of stored procedures to account for the possibility that this might occur.