My System.Data.SqlClient reports that I forgot to pass a parameter.
Well I have been scratching my head over this.
I use SQL Server 2008 R2 with Asp.Net MVC2 in VS2008.
Here is the screen.

What did I miss ?
EDIT
Here is the Stored Procedure Header
ALTER PROCEDURE [dbo].[ClientMst_AUTO](@Params VARCHAR(50),@result xml output)
as
BEGIN
The code looks good at first glance - the only point I'm seeing that might explain the behavior is this: you've defined your parameter @result as being ParameterDirection.InputOutput - but you're not supplying any value for that parameter on the input side...
Try to add this line before you add parm2 to the cmd.Parameters collection:
parm2.Value = string.Empty;
Does that change anything?
OR: just define the parameter as ParameterDirection.Output (instead of InputOutput) - does that solve the problem?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With