Thinking outside the box (or not): How to properly call a SQL stored procedure without any input parameters?
Summary
I hope this will be the first of many… and why not start creating a series call “Thinking outside the box (or not)” where I will address some common scenarios, requirements, operations, features and so on, and I will provide some tips or best approaches that you can implement. Taking this sample, calling a stored procedure that gets all the existing codes from a SQL table, let’s see all the different approaches that I found. I will not address this approach, but I think you may encounter that a lot, by using a helper class library to invoke the SQL Stored procedure using C# code. So, if you were following the post carefully, you may have noticed that in all the previous solutions we have used a map to generate the SQL Stored Procedure request message and we already saw why that is not the best approach. Now you just need to copy this XML sample and place it inside the Message Assignment shape, with support of our variable that we created previously, something like this: Why is this the best way for me?