Hi,
I created a stored procedure in the sql server. I try to insert a record
from the aspx page. But I keep getting this error,
"procedure expects parameter <@firstname>, which was not supplied". This is
what I am doing.
cmd.CommandText = "proc_insertuser";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@firstname", SqlDbType.VarChar, 50);
cmd.Parameters["@firstname"].Value = txtFirstName.Text
.....other parameters
I checked the parameter names, it matches correctly. The parameter does get
added to the collection. I checked it using
cmd.Parameters.Contains("@firstname") and the value is also correct. Using
query analyzer I executed the procedure, I am able to insert a record.
Can anyone tell me what could be the problem.
TAI
Senthil