This one has me stumped and I welcome your thoughts....
I am building a table based eCommerce shopping cart. I have a stored proc that takes two parameters, @SessionID and @ProductID. As you would expect, it removes the entire quantity of item @ProductID from the table for Session @SessionID.
Upstream, I have a data layer method in which I build a SqlCommand object and programatically set the respective parameters. I'm getting an exception on the ExecuteScalar method of the command. The error states that the stored procedure requires a parameter that wasn't supplied, but you can clearly see from the screenshot that it was. Since a picture is worth a thousand words, here's a screen shot:
Note the watch window showing values in both required params.
For good measure, here is my code in plain text:
Public Function RemoveItemFromCart(ByVal SessionID As String, ByVal ProductID As Integer) As Integer
Dim cmd As New SqlCommand("RemoveItemFromCart", cn)
View Complete Post