>>>Bonnie, you are a jewel.
>>>
>>>I had used AddWithValue on in that example because I was trying to follow the example Naomi showed. However, I did not know about using ParameterDirection.InputOutput. Thanks a bunch, I am going to dig into the MM code now to figure out if there is something different that is needed to keep it working there.
>>>
>>>Thanks again.
>>>Tim
>>>
>>
>>Tim,
>>
>>You were not attentive to details. That example only used AddWithValue for the input parameter (@Category). For the output parameter it used Add method.
>
>
>Yes, I know Naomi, but I used it as the first and only parameter in my case. I am not a SQL guru so was following your example by using it for the first example. Can you fill me in on the difference between AddWithValue and just Adding a parameter? I assumed they were the same except one included setting the value. Maybe I was wrong and probably is the case considering the issue.
>Thanks
>Tim
For the Output parameters you need to provide all details (type and length). This is only possible with Add method, not a quickie AddWithValue.
Also, you should try avoiding AddWithValue in the actual code. It's much better to always be 100% explicit and therefore use Add method. AddWithValue is only used because its syntax is simpler and easier to remember.
If it's not broken, fix it until it is.
My Blog