Expects parameter username which was not supplied




















AddWithValue " emailAddress", emailAddress ; dbcon. ToInt32 cmd. ExecuteScalar ; cmd. Clear ; cmd. ToInt32 i ; cmd. ToInt32 preference ; cmd. Your stored procedure expects 5 parameters as input userID int, userName varchar 50 , password nvarchar 50 , emailAddress nvarchar 50 , preferenceName varchar 20 So you should add all 5 parameters to this SP call: cmd. AddWithValue " emailAddress", emailAddress ; cmd. Submit your solution! When answering a question please: Read the question carefully.

Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid. Layout: fixed fluid. Web03 2. Strip HTML. Encode HTML. Paste as-is.

Code block. Further analysis revealed that some parameters had a value of null. I therefore must draw the conclusion that SqlCommand objects ignore any SqlParameter object in their. Parameters collection with a value of null. The original coder has moved on and the code was originally written with Solution 1 in mind, and having weighed up the benefits of both, I think I'll stick with Solution 1. It's much easier to specify a default value for a specific stored procedure when writing it, rather than it always being NULL as defined in the code.

PS: It's not clear what these parameter are for. StoredProcedure; cmd. AddWithValue " Firstname",uname ; cmd.

Text; bll. Text, TextBox2. Text ; if dt. Friday, August 17, AM. User posted you just named the parameter wrong, change cmd.



0コメント

  • 1000 / 1000