You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main issue, same DbParameter which user supplied to us cannot be added to multiple DbCommand.
For Input parameter, we added fix which is just to clone the DbParameter so that each command gets new DbParameter with same info.
Above fix is not possible for parameters which are output or inputoutput since the value updated after executing db command need to be reflected in the user created DbParameter which we have no way of doing.
Based on conversation #22485 (comment) and suggestion by @bricelam
We can actually make it work, if we know when to clone for additional queries. In that case, we will send first query with user supplied DbParameter and additional queries with cloned parameters. So first query will always update value and give back correct values to user.
The text was updated successfully, but these errors were encountered:
#11370 when DbParameter direction is something other than Input
Also see #22483
The main issue, same DbParameter which user supplied to us cannot be added to multiple DbCommand.
For Input parameter, we added fix which is just to clone the DbParameter so that each command gets new DbParameter with same info.
Above fix is not possible for parameters which are output or inputoutput since the value updated after executing db command need to be reflected in the user created DbParameter which we have no way of doing.
Based on conversation #22485 (comment) and suggestion by @bricelam
We can actually make it work, if we know when to clone for additional queries. In that case, we will send first query with user supplied DbParameter and additional queries with cloned parameters. So first query will always update value and give back correct values to user.
The text was updated successfully, but these errors were encountered: