Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
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
Raul Iloc 10-Dec-14 4:27am    
So your question is related with this exception (from your question title)?
If yes you should publish also the insert query.

1 solution

what is your insert Query ? you must be missing to pass one or more parameter value for your SQL Query.

In the code snippet, you are supplying value for the parameter @EN only. Please check the other Parameters of your SQL Query and also supply the input values for them.
 
Share this answer
 

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