The current version of the code may lead no malformed SQL, because of the sort while building the SQL, the @bind_params list may end up with the values in a different order than the binding names in the SQL. This is a possible fix, it seems to work correctly, feel free to address the problem in a different way.
The current version of the code may lead no malformed SQL, because of the sort while building the SQL, the @bind_params list may end up with the values in a different order than the binding names in the SQL. This is a possible fix, it seems to work correctly, feel free to address the problem in a different way.