Click here to Skip to main content
15,886,017 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
protected void btnSubmit_Click1(object sender, EventArgs e)
{
OleDbConnection conn = new OleDbConnection(connection);
conn.Open();
string insertQuery = "update TrainingEvent_Table set EditTextCon = @EN";

string editText = RemoveHTML(Hidden1.Value);

OleDbCommand cmd = new OleDbCommand(insertQuery, conn);
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@EN", editText.ToString());

cmd.ExecuteNonQuery();
}

public string RemoveHTML(string strHTML)
{
return Regex.Replace(strHTML, "<(.|\n)*?>", " ");
}
Posted
Comments
E.F. Nijboer 10-Dec-14 4:13am    
This is not a question
Rajnish D mishra 10-Dec-14 4:16am    
i have this type of error
E.F. Nijboer 10-Dec-14 4:18am    
Doesn't the debugger give you any more info? Also, there is no need to repost this again.
Sinisa Hajnal 10-Dec-14 4:20am    
What are you trying to do? Which line throws the error? Is there anything in editText?
Rajnish D mishra 10-Dec-14 4:25am    
yes editText Contain some value which shows on debugging but cmd.ExecuteNonQuery() throws error No-value-given-for-one-or-more-required-parameters

1 solution

try this query:
update [TrainingEvent_Table] set [EditTextCon] = @EN

may be its work....

This usually occurs when your column names are incorrect. Make sure they are consistent with the table you are getting the data from.
 
Share this answer
 
v2
Comments
Rajnish D mishra 10-Dec-14 4:51am    
thanx @vimal vataliya u r solution rally help me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900